Skip to content

Commit

Permalink
Disable foreign key check while updating database
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Schwarz committed Mar 14, 2024
1 parent 5004e44 commit ce79242
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/repository/migrations/mysql/07_fix-tag-id.down.sql
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE tag MODIFY id INTEGER;
SET FOREIGN_KEY_CHECKS = 1;
2 changes: 2 additions & 0 deletions internal/repository/migrations/mysql/07_fix-tag-id.up.sql
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE tag MODIFY id INTEGER AUTO_INCREMENT;
SET FOREIGN_KEY_CHECKS = 1;

0 comments on commit ce79242

Please sign in to comment.