Error 1025
nabil_joeseph
Posted messages
9
Status
Member
-
Crystale -
Crystale -
Hello everyone, I want to change the type of id_adm in the admin table from integer to varchar, but it shows me this error 1025.
2 answers
-
Hello,
If you have an error 1025, it means you have a foreign key attached to your column.
You must first remove the key. -
Well, I don’t know why, but I had the same problem with my database, an error 1025.
To resolve it, the SQL I found here and there didn’t allow me to get past the error, so I tried some ‘click-click’ software. So with phpMyAdmin, it didn’t work, but with MySQL Workbench, I managed to get it done!
RESOLUTION WITH MYSQL WORKBENCH:
Connect to your database with MySQL Workbench to find the problematic line (the one with the foreign key, I suppose).
Find your database in the list (for example: myDatabase1)
Open the hierarchy, find the table to modify (for example: myReallyBadTable)
Right-click on it, choose alter table.
In the window, find the problematic column (often a foreign key, for example: extMyColumnThatFails)
Once targeted: uncheck the boxes regarding it, then right-click > Delete selected columns.
Finally, at the bottom right > Apply. It’s very important; otherwise, it won’t save the changes.
For me, it didn’t raise any exceptions and properly removed the column, but I didn't think to copy the SQL, so if someone remembers, feel free to share it!