[icinga-checkins] icinga.org: icingaweb2-module-director/master: schema/pgsql: apply_to for notifications

git at icinga.org git at icinga.org
Sat May 21 00:28:54 CEST 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sat May 21 00:15:27 2016 +0200

schema/pgsql: apply_to for notifications

---

 schema/pgsql-migrations/upgrade_96.sql |    7 +++++++
 schema/pgsql.sql                       |    4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/schema/pgsql-migrations/upgrade_96.sql b/schema/pgsql-migrations/upgrade_96.sql
new file mode 100644
index 0000000..f96daa7
--- /dev/null
+++ b/schema/pgsql-migrations/upgrade_96.sql
@@ -0,0 +1,7 @@
+CREATE TYPE enum_host_service AS ENUM('host', 'service');
+
+ALTER TABLE icinga_notification ADD apply_to enum_host_service NULL DEFAULT NULL;
+
+INSERT INTO director_schema_migration
+  (schema_version, migration_time)
+  VALUES (96, NOW());
diff --git a/schema/pgsql.sql b/schema/pgsql.sql
index 2d4704f..2771d21 100644
--- a/schema/pgsql.sql
+++ b/schema/pgsql.sql
@@ -46,6 +46,7 @@ CREATE TYPE enum_sync_state AS ENUM(
     'pending-changes',
     'failing'
 );
+CREATE TYPE enum_host_service AS ENUM('host', 'service');
 
 
 CREATE TABLE director_activity_log (
@@ -1155,6 +1156,7 @@ CREATE TABLE icinga_notification (
   object_name CHARACTER VARYING(255) DEFAULT NULL,
   object_type enum_object_type_all NOT NULL,
   disabled enum_boolean NOT NULL DEFAULT 'n',
+  apply_to enum_host_service NULL DEFAULT NULL,
   host_id integer DEFAULT NULL,
   service_id integer DEFAULT NULL,
   times_begin integer DEFAULT NULL,
@@ -1516,4 +1518,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance
 
 INSERT INTO director_schema_migration
   (schema_version, migration_time)
-  VALUES (95, NOW());
+  VALUES (96, NOW());



More information about the icinga-checkins mailing list