Phpmyadmin 4 version: relationship relation sometimes does not show foreign key constraints

I have a database that I built some time ago. Each table in the database is InnoDb. Several tables had foreign key restrictions, and I set them to On Delete = Cascade . When I used an earlier version of phpmyadmin, working with them was simple: I just go to the “Structure” tab of the table, click the “View Relationships” link, and as long as I had the correct indexes configured on the correct columns, I could set foreign keys as I saw fit.

Starting with the upgrade to version 4, this becomes a nightmare. For some tables, I turn to the presentation of relationships, and everything is fine. But for others - even when they already have foreign key restrictions - I do not see any parameters for working with them.

To make matters worse, I even tried to reset the indexes and add them again, only to get the following error: Cannot drop index [index_name]: needed in a foreign key constraint. Therefore, if I am not mistaken, there is a restriction, but phpmyadmin refuses to show it to me.

Is there something I have to do to make them reappear? This is extremely frustrating, to say the least: something that has worked so far is not related to the update.

+8
database mysql phpmyadmin foreign-keys
source share
2 answers

Well, after playing a little with the tables, I realized what was going on. The only time that foreign key constraint options are not displayed is when the table names contain capital letters. Very unpleasant, to say the least.

+15
source share

I just posted an error report for phpmyadmin: https://github.com/phpmyadmin/phpmyadmin/issues/11461

This should be an easy fix.

+1
source share

All Articles