schema: add notification assignment tables
This commit is contained in:
parent
7209f162b2
commit
247ef41483
|
@ -0,0 +1,15 @@
|
|||
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,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT icinga_notification_assignment
|
||||
FOREIGN KEY notification (notification_id)
|
||||
REFERENCES icinga_notification (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (85, NOW());
|
|
@ -1029,6 +1029,18 @@ CREATE TABLE icinga_notification_types_set (
|
|||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
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,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT icinga_notification_assignment
|
||||
FOREIGN KEY notification (notification_id)
|
||||
REFERENCES icinga_notification (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE import_source (
|
||||
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
|
||||
source_name VARCHAR(64) NOT NULL,
|
||||
|
@ -1213,4 +1225,4 @@ CREATE TABLE sync_run (
|
|||
|
||||
INSERT INTO director_schema_migration
|
||||
SET migration_time = NOW(),
|
||||
schema_version = 84;
|
||||
schema_version = 85;
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
CREATE TABLE icinga_notification_assignment (
|
||||
id bigserial,
|
||||
notification_id integer NOT NULL,
|
||||
filter_string TEXT NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT icinga_notification_assignment
|
||||
FOREIGN KEY (notification_id)
|
||||
REFERENCES icinga_notification (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (85, NOW());
|
|
@ -1152,6 +1152,19 @@ CREATE TABLE icinga_notification (
|
|||
);
|
||||
|
||||
|
||||
CREATE TABLE icinga_notification_assignment (
|
||||
id bigserial,
|
||||
notification_id integer NOT NULL,
|
||||
filter_string TEXT NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT icinga_notification_assignment
|
||||
FOREIGN KEY (notification_id)
|
||||
REFERENCES icinga_notification (id)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE import_source (
|
||||
id serial,
|
||||
source_name character varying(64) NOT NULL,
|
||||
|
@ -1424,4 +1437,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance
|
|||
-- set current schema version
|
||||
INSERT INTO director_schema_migration
|
||||
(schema_version, migration_time)
|
||||
VALUES (84, NOW());
|
||||
VALUES (85, NOW());
|
||||
|
|
Loading…
Reference in New Issue