TablePlus-Windows
TablePlus-Windows copied to clipboard
Cannot Delete Fields That Are Constrained (with FOREIGN_KEY_CHECKS disabled)
Please answer the questions below, it helps us to track the issue.
-
Which driver are you using and version of it (Ex: PostgreSQL 10.0): MariaDB 5.5.68
-
Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 184
-
The steps to reproduce this issue:
I have a failed migration from Laravel, and to delete it I used to be able to do...
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `db`.`table`
DROP INDEX `tab1_tab2_id_foreign`;
DROP COLUMN `that_id`;
SET FOREIGN_KEY_CHECKS=1;
Now when I run this, it reports that all three queries run, but there has been no change to the table.
If you remove the last line it does spit out errors for the second line.
I have concluded that the first line SET FOREIGN_KEY_CHECKS=0
does nothing, I simply cannot delete a field if it is in a contraint.
This used to work a few build ago, but I cannot get it to work any longer.
I use TablePlus on on Windows 10.
Hi @themrflibble, first, could you please do not remove the issue template? It will help us to filter and check issues quickly. Second, I don't understand what problem that you faced to, could you attach the reproducing steps? Those steps will let us know exactly what's happening. More than that, thank so much for your feedback.
Hi @themrflibble, first, could you please do not remove the issue template? It will help us to filter and check issues quickly. Second, I don't understand what problem that you faced to, could you attach the reproducing steps? Those steps will let us know exactly what's happening. More than that, thank so much for your feedback.
I have updated the above.