mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-26 23:34:10 +02:00
parent
56af88ee3f
commit
46a9b2574b
19
schema/mysql-migrations/upgrade_131.sql
Normal file
19
schema/mysql-migrations/upgrade_131.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
CREATE TABLE icinga_hostgroup_host_resolved (
|
||||||
|
hostgroup_id INT(10) UNSIGNED NOT NULL,
|
||||||
|
host_id INT(10) UNSIGNED NOT NULL,
|
||||||
|
PRIMARY KEY (hostgroup_id, host_id),
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_host
|
||||||
|
FOREIGN KEY host (host_id)
|
||||||
|
REFERENCES icinga_host (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_hostgroup
|
||||||
|
FOREIGN KEY hostgroup (hostgroup_id)
|
||||||
|
REFERENCES icinga_hostgroup (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
INSERT INTO director_schema_migration
|
||||||
|
(schema_version, migration_time)
|
||||||
|
VALUES (131, NOW());
|
@ -820,6 +820,22 @@ CREATE TABLE icinga_hostgroup_host (
|
|||||||
ON UPDATE CASCADE
|
ON UPDATE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
CREATE TABLE icinga_hostgroup_host_resolved (
|
||||||
|
hostgroup_id INT(10) UNSIGNED NOT NULL,
|
||||||
|
host_id INT(10) UNSIGNED NOT NULL,
|
||||||
|
PRIMARY KEY (hostgroup_id, host_id),
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_host
|
||||||
|
FOREIGN KEY host (host_id)
|
||||||
|
REFERENCES icinga_host (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_hostgroup
|
||||||
|
FOREIGN KEY hostgroup (hostgroup_id)
|
||||||
|
REFERENCES icinga_hostgroup (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE icinga_hostgroup_parent (
|
CREATE TABLE icinga_hostgroup_parent (
|
||||||
hostgroup_id INT(10) UNSIGNED NOT NULL,
|
hostgroup_id INT(10) UNSIGNED NOT NULL,
|
||||||
parent_hostgroup_id INT(10) UNSIGNED NOT NULL,
|
parent_hostgroup_id INT(10) UNSIGNED NOT NULL,
|
||||||
@ -1508,4 +1524,4 @@ CREATE TABLE icinga_user_resolved_var (
|
|||||||
|
|
||||||
INSERT INTO director_schema_migration
|
INSERT INTO director_schema_migration
|
||||||
(schema_version, migration_time)
|
(schema_version, migration_time)
|
||||||
VALUES (130, NOW());
|
VALUES (131, NOW());
|
||||||
|
22
schema/pgsql-migrations/upgrade_131.sql
Normal file
22
schema/pgsql-migrations/upgrade_131.sql
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
CREATE TABLE icinga_hostgroup_host_resolved (
|
||||||
|
hostgroup_id integer NOT NULL,
|
||||||
|
host_id integer NOT NULL,
|
||||||
|
PRIMARY KEY (hostgroup_id, host_id),
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_host
|
||||||
|
FOREIGN KEY (host_id)
|
||||||
|
REFERENCES icinga_host (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_hostgroup
|
||||||
|
FOREIGN KEY (hostgroup_id)
|
||||||
|
REFERENCES icinga_hostgroup (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX hostgroup_host_resolved_host ON icinga_hostgroup_host_resolved (host_id);
|
||||||
|
CREATE INDEX hostgroup_host_resolved_hostgroup ON icinga_hostgroup_host_resolved (hostgroup_id);
|
||||||
|
|
||||||
|
INSERT INTO director_schema_migration
|
||||||
|
(schema_version, migration_time)
|
||||||
|
VALUES (131, NOW());
|
@ -1016,6 +1016,26 @@ CREATE INDEX hostgroup_host_host ON icinga_hostgroup_host (host_id);
|
|||||||
CREATE INDEX hostgroup_host_hostgroup ON icinga_hostgroup_host (hostgroup_id);
|
CREATE INDEX hostgroup_host_hostgroup ON icinga_hostgroup_host (hostgroup_id);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE icinga_hostgroup_host_resolved (
|
||||||
|
hostgroup_id integer NOT NULL,
|
||||||
|
host_id integer NOT NULL,
|
||||||
|
PRIMARY KEY (hostgroup_id, host_id),
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_host
|
||||||
|
FOREIGN KEY (host_id)
|
||||||
|
REFERENCES icinga_host (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT icinga_hostgroup_host_resolved_hostgroup
|
||||||
|
FOREIGN KEY (hostgroup_id)
|
||||||
|
REFERENCES icinga_hostgroup (id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE INDEX hostgroup_host_resolved_host ON icinga_hostgroup_host_resolved (host_id);
|
||||||
|
CREATE INDEX hostgroup_host_resolved_hostgroup ON icinga_hostgroup_host_resolved (hostgroup_id);
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE icinga_hostgroup_parent (
|
CREATE TABLE icinga_hostgroup_parent (
|
||||||
hostgroup_id integer NOT NULL,
|
hostgroup_id integer NOT NULL,
|
||||||
parent_hostgroup_id integer NOT NULL,
|
parent_hostgroup_id integer NOT NULL,
|
||||||
@ -1775,4 +1795,4 @@ CREATE INDEX user_resolved_var_schecksum ON icinga_user_resolved_var (checksum);
|
|||||||
|
|
||||||
INSERT INTO director_schema_migration
|
INSERT INTO director_schema_migration
|
||||||
(schema_version, migration_time)
|
(schema_version, migration_time)
|
||||||
VALUES (128, NOW());
|
VALUES (131, NOW());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user