schema: prepare dependency host vars

fixes #1870
This commit is contained in:
Thomas Gelf 2019-07-08 13:28:57 +02:00
parent e9bde184f1
commit 8de93a1a9a
4 changed files with 17 additions and 2 deletions

View File

@ -0,0 +1,8 @@
SET sql_mode = 'STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION,PIPES_AS_CONCAT,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO';
ALTER TABLE icinga_dependency
ADD COLUMN parent_host_var VARCHAR(128) DEFAULT NULL AFTER parent_host_id;
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (164, NOW());

View File

@ -1845,4 +1845,4 @@ CREATE TABLE icinga_scheduled_downtime_range (
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (163, NOW());
VALUES (164, NOW());

View File

@ -0,0 +1,6 @@
ALTER TABLE icinga_dependency
ADD COLUMN parent_host_var character varying(128) DEFAULT NULL;
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (164, NOW());

View File

@ -1965,6 +1965,7 @@ CREATE TABLE icinga_dependency (
disabled enum_boolean DEFAULT 'n',
apply_to enum_host_service NULL DEFAULT NULL,
parent_host_id integer DEFAULT NULL,
parent_host_var character varying(128) DEFAULT NULL,
parent_service_id integer DEFAULT NULL,
child_host_id integer DEFAULT NULL,
child_service_id integer DEFAULT NULL,
@ -2156,4 +2157,4 @@ COMMENT ON COLUMN icinga_scheduled_downtime_range.merge_behaviour IS 'set -> = {
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (162, NOW());
VALUES (164, NOW());