summaryrefslogtreecommitdiffstats
path: root/schema/pgsql-migrations/upgrade_149.sql
diff options
context:
space:
mode:
Diffstat (limited to 'schema/pgsql-migrations/upgrade_149.sql')
-rw-r--r--schema/pgsql-migrations/upgrade_149.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/schema/pgsql-migrations/upgrade_149.sql b/schema/pgsql-migrations/upgrade_149.sql
new file mode 100644
index 0000000..9fe8d5e
--- /dev/null
+++ b/schema/pgsql-migrations/upgrade_149.sql
@@ -0,0 +1,14 @@
+ALTER TABLE icinga_usergroup
+ ADD COLUMN zone_id integer DEFAULT NULL,
+ ADD CONSTRAINT icinga_usergroup_zone
+ FOREIGN KEY (zone_id)
+ REFERENCES icinga_zone (id)
+ ON DELETE RESTRICT
+ ON UPDATE CASCADE;
+
+CREATE INDEX usergroup_zone ON icinga_usergroup (zone_id);
+
+
+INSERT INTO director_schema_migration
+ (schema_version, migration_time)
+ VALUES (149, NOW());