summaryrefslogtreecommitdiffstats
path: root/schema/mysql-legacy-changes/upgrade_55.sql
diff options
context:
space:
mode:
Diffstat (limited to 'schema/mysql-legacy-changes/upgrade_55.sql')
-rw-r--r--schema/mysql-legacy-changes/upgrade_55.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/schema/mysql-legacy-changes/upgrade_55.sql b/schema/mysql-legacy-changes/upgrade_55.sql
new file mode 100644
index 0000000..4ad6feb
--- /dev/null
+++ b/schema/mysql-legacy-changes/upgrade_55.sql
@@ -0,0 +1,8 @@
+ALTER TABLE icinga_zone
+ DROP FOREIGN KEY icinga_zone_parent_zone,
+ CHANGE parent_zone_id parent_id INT(10) UNSIGNED DEFAULT NULL,
+ ADD CONSTRAINT icinga_zone_parent
+ FOREIGN KEY parent_zone (parent_id)
+ REFERENCES icinga_zone (id)
+ ON DELETE RESTRICT
+ ON UPDATE CASCADE;