Renaming foreign-key columns in MySQL

前端 未结 6 1903
小鲜肉
小鲜肉 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:45

    AFAIK, dropping the constraint, then rename, then add the constraint back is the only way. Backup first!

提交回复
热议问题