#1025 - Error on rename of './database/#sql-2e0f_1254ba7' to './database/table' (errno: 150)

后端 未结 7 1410
星月不相逢
星月不相逢 2020-12-12 14:34

So I am trying to add a primary key to one of the tables in my database. Right now it has a primary key like this:

PRIMARY KEY (user_id, round_number)
         


        
7条回答
  •  难免孤独
    2020-12-12 15:20

    To bypass this in PHPMyAdmin or with MySQL, first remove the foreign key constraint before renaming the attribute.

    (For PHPMyAdmin users: To remove FK constrains in PHPMyAdmin, select the attribute then click "relation view" next to "print view" in the toolbar below the table structure)

提交回复
热议问题