Menu

#316 Alter table - drop column with foreign key

3.6.3
closed-wont-fix
MySQL (74)
5
2013-04-26
2013-04-25
Anonymous
No

If you try to drop a column, that references to another InnoDB table, you get an error like "Error on rename of './db/#sql-420_58' to './db/table' (errno: 150)".

You have to drop the foreign key first and then you can drop the column. Would be great if Adminer dropped the foreign key automatically on attempt to drop such column.

Discussion

  • Jakub Vrána

    Jakub Vrána - 2013-04-26
    • status: open --> closed-wont-fix
     
  • Jakub Vrána

    Jakub Vrána - 2013-04-26

    The column may be used in multi-column foreign key and it's not clear whether it should drop the whole foreign key or just the single column from it.

     

Log in to post a comment.