From 443ce0e848a0da4fa7c80dd5b077fb6b8a545126 Mon Sep 17 00:00:00 2001 From: Maik Qualmann Date: Fri, 19 Jan 2018 07:07:08 +0100 Subject: disable foreign key checks temporarily for the Tags table BUGS: 388824 --- data/database/dbconfig.xml.cmake.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/database/dbconfig.xml.cmake.in b/data/database/dbconfig.xml.cmake.in index a1cd69f..a98434b 100644 --- a/data/database/dbconfig.xml.cmake.in +++ b/data/database/dbconfig.xml.cmake.in @@ -2141,6 +2141,7 @@ ENGINE InnoDB; INSERT IGNORE INTO ImageCopyright SELECT * FROM ImageCopyright_old; + SET FOREIGN_KEY_CHECKS=0; RENAME TABLE Tags TO Tags_old; CREATE TABLE Tags LIKE Tags_old; ALTER TABLE Tags @@ -2154,6 +2155,7 @@ (SELECT MAX(tr.rgt) FROM Tags AS tr)); SET SQL_MODE=@OLD_SQL_MODE; UPDATE Tags SET icon = NULL WHERE icon = 0; + SET FOREIGN_KEY_CHECKS=1; RENAME TABLE ImageTags TO ImageTags_old; CREATE TABLE ImageTags LIKE ImageTags_old; -- cgit v0.11.2