Created
October 27, 2019 10:18
-
-
Save Gustavo-Kuze/da305b3e3f2f7f11f9cd2402d124cde8 to your computer and use it in GitHub Desktop.
ERRO: Cannot change column 'id': used in a foreign key constraint '
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quando o erro "Cannot change column 'id': used in a foreign key constraint '" | |
acontecer ao tentar atualizar um id que é referenciado por uma FK é possível desativar | |
a verificação das FKs com a flag abaixo | |
SET FOREIGN_KEY_CHECKS = 0; | |
/* Faça o que quiser aqui */ | |
SET FOREIGN_KEY_CHECKS = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment