[icinga-checkins] icinga.org: icingaweb2-module-director/master: mysql-migrations/ upgrade_126: one more weird...

git at icinga.org git at icinga.org
Tue Jan 3 17:12:24 CET 2017


Module: icingaweb2-module-director
Branch: master
Commit: e64e4de6780c84147afe08d26152a866c27b3b03
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=e64e4de6780c84147afe08d26152a866c27b3b03

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Jan  3 17:09:34 2017 +0100

mysql-migrations/upgrade_126: one more weird...

...index bound to die

fixes #13859

---

 schema/mysql-migrations/upgrade_126.sql |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/schema/mysql-migrations/upgrade_126.sql b/schema/mysql-migrations/upgrade_126.sql
index ef14078..d655eaa 100644
--- a/schema/mysql-migrations/upgrade_126.sql
+++ b/schema/mysql-migrations/upgrade_126.sql
@@ -52,6 +52,26 @@ DEALLOCATE PREPARE stmt;
 SET @stmt = NULL;
 
 
+
+SET @stmt = (SELECT IF(
+    (SELECT EXISTS(
+        SELECT * FROM information_schema.table_constraints
+        WHERE
+            table_schema   = DATABASE()
+            AND table_name = 'icinga_service_set'
+            AND constraint_name = 'icinga_service_set_ibfk_3'
+    )),
+    'ALTER TABLE icinga_service_set DROP FOREIGN KEY icinga_service_set_ibfk_3',
+    'SELECT 1'
+));
+
+PREPARE stmt FROM @stmt;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+SET @stmt = NULL;
+
+
+
 SET @stmt = (SELECT IF(
     (SELECT EXISTS(
         SELECT * FROM information_schema.table_constraints



More information about the icinga-checkins mailing list