Cannot see MySQL foreign keys
Database management in a single PHP file
Brought to you by:
jakubvrana
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.)
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.
Thanks for the fix.