#1333 (ok 4.0.0-beta2) Name foreign key constraints

Needs_decision
fixed
1
2013-06-11
2011-11-03
No

MySQL allows to give an explicit name to foreign key constraints.
It would be fine if phpMyAdmin could add a field in the "Relation view" to view and edit this FK name.

For example the following statement: ALTER TABLE X ADD FOREIGN KEY (fk) REFERENCES Y (id);
Automatically assigns this name: x_ibfk_1

These automated names are assigned with an auto-incrementing number, which is not predictable if we don't know in which order the foreign keys have been defined. When we have to create SQL patches to be ran on a database, there is most often no way to know the foreign key name reliably if someone created it with phpMyAdmin!

Discussion

  • Marc Delisle

    Marc Delisle - 2013-02-28
    • labels: Relations,Comments,History,... --> Relations, Comments, History, ...
    • summary: Name foreign key constraints --> (ok 4.0.0-beta2) Name foreign key constraints
    • assigned_to: Marc Delisle
    • milestone: --> Needs_decision
    • priority: 5 --> 1
     
  • Michal Čihař

    Michal Čihař - 2013-05-09
    • Status: open --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed