Prevent auto-foreign key

  • Yoji

    Yoji - 2012-04-01

    When altering the table, if I enter product_id or xxx_id and the table product or xxx exists, type automatically changes to foreign key. This may be useful for many, but it's really annoying for me. Is there a setting to prevent automatic foreign key discovery? Or at least where can I change an "if" in the script to prevent this?
    Thank you!

  • Jakub Vrána

    Jakub Vrána - 2012-04-15

    You should be able to overwrite method editingNameChange in your plugin.

    Why it is annoying for you?

  • Yoji

    Yoji - 2012-04-18

    I've downloaded this adminer.php file and I found the editingNameChange function but due to compressed format of the file I found inappropriate to change anything. But I'll take a look.
    Why is annoying? Well, I don't' use foreign keys. I always use a data model where Fk would fail. Several times I wasn't seeing FK's created (automatically) and caused trouble from php, altering the tables. This brokes down the whole site.
    BTW adminer is awesome. I completely changed off pma with adminer.
    One another single issue can be always switching on comments and default values…

  • Jakub Vrána

    Jakub Vrána - 2012-05-14

    You can download uncompressed source codes from (or use the development version). It should be possible to initially show comments and default values by overriding some JS function too. You can even make a plugin from it if you wish.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks