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