How do I rename a foreign key in mysql?

前端 未结 4 2105
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 15:27

We\'ve just completed a long-running migration on a large table, and ended up with the following constraint on our conversation_tags table:

CONSTRAINT `conve         


        
4条回答
  •  余生分开走
    2020-12-14 15:39

    Please refer to my answer in MySQL terminology "constraints" vs "foreign keys" difference? to understand why the constraint name was different than what you desired. However, MySQL doesnot have rename constraint feature and hence need to DROP and ADD FK with desired name . https://dev.mysql.com/doc/refman/5.5/en/alter-table.html

提交回复
热议问题