From 19d56fc546eaee892e9934e2af305124e53dbe1d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 27 Mar 2016 19:11:28 +0200 Subject: [PATCH] schema: add notification assign type column thnx @spillerm refs #11452 --- schema/mysql-migrations/upgrade_91.sql | 5 +++++ schema/mysql.sql | 3 ++- schema/pgsql-migrations/upgrade_91.sql | 5 +++++ schema/pgsql.sql | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 schema/mysql-migrations/upgrade_91.sql create mode 100644 schema/pgsql-migrations/upgrade_91.sql diff --git a/schema/mysql-migrations/upgrade_91.sql b/schema/mysql-migrations/upgrade_91.sql new file mode 100644 index 00000000..88a551fb --- /dev/null +++ b/schema/mysql-migrations/upgrade_91.sql @@ -0,0 +1,5 @@ +ALTER TABLE icinga_notification_assignment ADD assign_type ENUM('assign', 'ignore') NOT NULL DEFAULT 'assign'; + +INSERT INTO director_schema_migration + (schema_version, migration_time) + VALUES (91, NOW()); diff --git a/schema/mysql.sql b/schema/mysql.sql index 283cb6cd..474d0c6a 100644 --- a/schema/mysql.sql +++ b/schema/mysql.sql @@ -1035,6 +1035,7 @@ CREATE TABLE icinga_notification_assignment ( id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, notification_id INT(10) UNSIGNED NOT NULL, filter_string TEXT NOT NULL, + assign_type ENUM('assign', 'ignore') NOT NULL DEFAULT 'assign', PRIMARY KEY (id), CONSTRAINT icinga_notification_assignment FOREIGN KEY notification (notification_id) @@ -1259,4 +1260,4 @@ CREATE TABLE sync_run ( INSERT INTO director_schema_migration SET migration_time = NOW(), - schema_version = 90; + schema_version = 91; diff --git a/schema/pgsql-migrations/upgrade_91.sql b/schema/pgsql-migrations/upgrade_91.sql new file mode 100644 index 00000000..c20a24a0 --- /dev/null +++ b/schema/pgsql-migrations/upgrade_91.sql @@ -0,0 +1,5 @@ +ALTER TABLE icinga_notification_assignment ADD assign_type enum_assign_type NOT NULL DEFAULT 'assign'; + +INSERT INTO director_schema_migration + (schema_version, migration_time) + VALUES (91, NOW()); diff --git a/schema/pgsql.sql b/schema/pgsql.sql index 8fcaae0b..d5612ed0 100644 --- a/schema/pgsql.sql +++ b/schema/pgsql.sql @@ -1159,6 +1159,7 @@ CREATE TABLE icinga_notification_assignment ( id bigserial, notification_id integer NOT NULL, filter_string TEXT NOT NULL, + assign_type enum_assign_type NOT NULL DEFAULT 'assign', PRIMARY KEY (id), CONSTRAINT icinga_notification_assignment FOREIGN KEY (notification_id) @@ -1472,4 +1473,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance INSERT INTO director_schema_migration (schema_version, migration_time) - VALUES (90, NOW()); + VALUES (91, NOW());