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());