Renaming foreign-key columns in MySQL

前端 未结 6 1909
小鲜肉
小鲜肉 2020-11-30 07:20

We\'re trying to rename a column in MySQL (5.1.31, InnoDB) that is a foreign key to another table.

At first, we tried to use Django-South, but came up against a know

6条回答
  •  被撕碎了的回忆
    2020-11-30 07:41

    This task becomes simpler if you use GUI tools. I tried to rename ID column using IntelliJ IDEA Database tool and it worked like a charm! I don't have to bother about foreign keys when renaming a table or column.

    See more details in IntelliJ IDEA Help | Renaming items.

    MySQL 5.7

提交回复
热议问题