Menu

#620 Cannot see MySQL foreign keys

4.6.2
closed-fixed
nobody
6
2018-07-15
2018-05-17
No

Adminer 4.6.2 (and I believe previous versions as well)
MySQL version: 5.5.60-0ubuntu0.14.04.1 through PHP extension MySQLi

The problem is really easy to describe... I cannot see foreign keys.

I can create two tables, one with a foreign key referencing the other, and both queries execute successfully. I can export the tables, and see that the foreign key was indeed there, and was exported correctly. But, in Adminer, while I do see that the index was created on Table B, I do not see the foreign key.

(Note that I have added ANSI_QUOTES to my sql_mode, hence the double quotes in my queries rather than backticks.)

1 Attachments

Discussion

  • Jared Brandt

    Jared Brandt - 2018-05-17

    Actually, hey, now that I've typed it out, I realized what was happening... It is because of ANSI_QUOTES. Adminer is preg_match()ing for backticks only in the foreign keys area. I have changed the pattern and issued a pull request, if you'd like to accept.

     
  • Jakub Vrána

    Jakub Vrána - 2018-07-15
    • status: open --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2018-07-15

    Thanks for the fix.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.