schema: add notification assign type column

thnx @spillerm

refs #11452
This commit is contained in:
Thomas Gelf 2016-03-27 19:11:28 +02:00
parent bc6bac9a62
commit 19d56fc546
4 changed files with 14 additions and 2 deletions

View File

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

View File

@ -1035,6 +1035,7 @@ CREATE TABLE icinga_notification_assignment (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
notification_id INT(10) UNSIGNED NOT NULL, notification_id INT(10) UNSIGNED NOT NULL,
filter_string TEXT NOT NULL, filter_string TEXT NOT NULL,
assign_type ENUM('assign', 'ignore') NOT NULL DEFAULT 'assign',
PRIMARY KEY (id), PRIMARY KEY (id),
CONSTRAINT icinga_notification_assignment CONSTRAINT icinga_notification_assignment
FOREIGN KEY notification (notification_id) FOREIGN KEY notification (notification_id)
@ -1259,4 +1260,4 @@ CREATE TABLE sync_run (
INSERT INTO director_schema_migration INSERT INTO director_schema_migration
SET migration_time = NOW(), SET migration_time = NOW(),
schema_version = 90; schema_version = 91;

View File

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

View File

@ -1159,6 +1159,7 @@ CREATE TABLE icinga_notification_assignment (
id bigserial, id bigserial,
notification_id integer NOT NULL, notification_id integer NOT NULL,
filter_string TEXT NOT NULL, filter_string TEXT NOT NULL,
assign_type enum_assign_type NOT NULL DEFAULT 'assign',
PRIMARY KEY (id), PRIMARY KEY (id),
CONSTRAINT icinga_notification_assignment CONSTRAINT icinga_notification_assignment
FOREIGN KEY (notification_id) FOREIGN KEY (notification_id)
@ -1472,4 +1473,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance
INSERT INTO director_schema_migration INSERT INTO director_schema_migration
(schema_version, migration_time) (schema_version, migration_time)
VALUES (90, NOW()); VALUES (91, NOW());