From 0ad779e4a5448c99558dc87368040cee76566d32 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 13 Jun 2014 11:21:15 +0200 Subject: [PATCH] DB IDO: Remove old 0.0.x upgrade sqls not required for 2.0.0 fixes #6478 --- .../db_ido_mysql/schema/upgrade/.gitignore | 0 .../db_ido_mysql/schema/upgrade/0.0.10.sql | 8 -- .../db_ido_mysql/schema/upgrade/0.0.11.sql | 13 --- .../db_ido_mysql/schema/upgrade/0.0.8.sql | 80 ------------------- .../db_ido_mysql/schema/upgrade/0.0.9.sql | 2 - .../db_ido_pgsql/schema/upgrade/.gitignore | 0 .../db_ido_pgsql/schema/upgrade/0.0.10.sql | 8 -- .../db_ido_pgsql/schema/upgrade/0.0.11.sql | 14 ---- .../db_ido_pgsql/schema/upgrade/0.0.8.sql | 76 ------------------ .../db_ido_pgsql/schema/upgrade/0.0.9.sql | 2 - 10 files changed, 203 deletions(-) create mode 100644 components/db_ido_mysql/schema/upgrade/.gitignore delete mode 100644 components/db_ido_mysql/schema/upgrade/0.0.10.sql delete mode 100644 components/db_ido_mysql/schema/upgrade/0.0.11.sql delete mode 100644 components/db_ido_mysql/schema/upgrade/0.0.8.sql delete mode 100644 components/db_ido_mysql/schema/upgrade/0.0.9.sql create mode 100644 components/db_ido_pgsql/schema/upgrade/.gitignore delete mode 100644 components/db_ido_pgsql/schema/upgrade/0.0.10.sql delete mode 100644 components/db_ido_pgsql/schema/upgrade/0.0.11.sql delete mode 100644 components/db_ido_pgsql/schema/upgrade/0.0.8.sql delete mode 100644 components/db_ido_pgsql/schema/upgrade/0.0.9.sql diff --git a/components/db_ido_mysql/schema/upgrade/.gitignore b/components/db_ido_mysql/schema/upgrade/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/components/db_ido_mysql/schema/upgrade/0.0.10.sql b/components/db_ido_mysql/schema/upgrade/0.0.10.sql deleted file mode 100644 index 1fdff956b..000000000 --- a/components/db_ido_mysql/schema/upgrade/0.0.10.sql +++ /dev/null @@ -1,8 +0,0 @@ - - -ALTER TABLE icinga_hostgroups ADD COLUMN notes TEXT character set latin1 default NULL; -ALTER TABLE icinga_hostgroups ADD COLUMN notes_url TEXT character set latin1 default NULL; -ALTER TABLE icinga_hostgroups ADD COLUMN action_url TEXT character set latin1 default NULL; -ALTER TABLE icinga_servicegroups ADD COLUMN notes TEXT character set latin1 default NULL; -ALTER TABLE icinga_servicegroups ADD COLUMN notes_url TEXT character set latin1 default NULL; -ALTER TABLE icinga_servicegroups ADD COLUMN action_url TEXT character set latin1 default NULL; diff --git a/components/db_ido_mysql/schema/upgrade/0.0.11.sql b/components/db_ido_mysql/schema/upgrade/0.0.11.sql deleted file mode 100644 index 49c7cfe7a..000000000 --- a/components/db_ido_mysql/schema/upgrade/0.0.11.sql +++ /dev/null @@ -1,13 +0,0 @@ - - --- ----------------------------------------- --- #6094 --- ----------------------------------------- - -ALTER TABLE icinga_hoststatus ADD COLUMN is_reachable smallint(6) DEFAULT NULL; -ALTER TABLE icinga_servicestatus ADD COLUMN is_reachable smallint(6) DEFAULT NULL; - --- ----------------------------------------- --- set dbversion --- ----------------------------------------- -INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.3', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.3', modify_time=NOW(); diff --git a/components/db_ido_mysql/schema/upgrade/0.0.8.sql b/components/db_ido_mysql/schema/upgrade/0.0.8.sql deleted file mode 100644 index 2f17058fd..000000000 --- a/components/db_ido_mysql/schema/upgrade/0.0.8.sql +++ /dev/null @@ -1,80 +0,0 @@ - - --- ----------------------------------------- --- #5612 --- ----------------------------------------- -ALTER TABLE icinga_statehistory ADD COLUMN check_source varchar(255) character set latin1 default NULL; - --- ----------------------------------------- --- #5731 --- ----------------------------------------- -ALTER TABLE icinga_conninfo MODIFY agent_version VARCHAR(32); -ALTER TABLE icinga_conninfo MODIFY disposition VARCHAR(32); -ALTER TABLE icinga_conninfo MODIFY connect_source VARCHAR(32); -ALTER TABLE icinga_conninfo MODIFY connect_type VARCHAR(32); - --- -------------------------------------------------------- --- Icinga 2 specific schema extensions --- -------------------------------------------------------- - --- --- Table structure for table icinga_endpoints --- - -CREATE TABLE IF NOT EXISTS icinga_endpoints ( - endpoint_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - instance_id bigint unsigned default 0, - endpoint_object_id bigint(20) unsigned DEFAULT '0', - config_type smallint(6) DEFAULT '0', - identity varchar(255) DEFAULT NULL, - node varchar(255) DEFAULT NULL, - PRIMARY KEY (endpoint_id) -) ENGINE=InnoDB COMMENT='Endpoint configuration'; - --- -------------------------------------------------------- - --- --- Table structure for table icinga_endpointstatus --- - -CREATE TABLE IF NOT EXISTS icinga_endpointstatus ( - endpointstatus_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, - instance_id bigint unsigned default 0, - endpoint_object_id bigint(20) unsigned DEFAULT '0', - status_update_time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - identity varchar(255) DEFAULT NULL, - node varchar(255) DEFAULT NULL, - is_connected smallint(6), - PRIMARY KEY (endpointstatus_id) -) ENGINE=InnoDB COMMENT='Endpoint status'; - - -ALTER TABLE icinga_servicestatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_hoststatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_contactstatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_programstatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_comments ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_scheduleddowntime ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_runtimevariables ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_customvariablestatus ADD COLUMN endpoint_object_id bigint default NULL; - -ALTER TABLE icinga_acknowledgements ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_commenthistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_contactnotifications ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_downtimehistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_eventhandlers ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_externalcommands ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_flappinghistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_hostchecks ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_logentries ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_notifications ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_processevents ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_servicechecks ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_statehistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_systemcommands ADD COLUMN endpoint_object_id bigint default NULL; - --- ----------------------------------------- --- set dbversion --- ----------------------------------------- -INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.0', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.0', modify_time=NOW(); - diff --git a/components/db_ido_mysql/schema/upgrade/0.0.9.sql b/components/db_ido_mysql/schema/upgrade/0.0.9.sql deleted file mode 100644 index d0fa61510..000000000 --- a/components/db_ido_mysql/schema/upgrade/0.0.9.sql +++ /dev/null @@ -1,2 +0,0 @@ - -ALTER TABLE icinga_hosts ADD COLUMN check_service_object_id bigint default NULL; diff --git a/components/db_ido_pgsql/schema/upgrade/.gitignore b/components/db_ido_pgsql/schema/upgrade/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/components/db_ido_pgsql/schema/upgrade/0.0.10.sql b/components/db_ido_pgsql/schema/upgrade/0.0.10.sql deleted file mode 100644 index c80125904..000000000 --- a/components/db_ido_pgsql/schema/upgrade/0.0.10.sql +++ /dev/null @@ -1,8 +0,0 @@ - - -ALTER TABLE icinga_hostgroups ADD COLUMN notes TEXT default NULL; -ALTER TABLE icinga_hostgroups ADD COLUMN notes_url TEXT default NULL; -ALTER TABLE icinga_hostgroups ADD COLUMN action_url TEXT default NULL; -ALTER TABLE icinga_servicegroups ADD COLUMN notes TEXT default NULL; -ALTER TABLE icinga_servicegroups ADD COLUMN notes_url TEXT default NULL; -ALTER TABLE icinga_servicegroups ADD COLUMN action_url TEXT default NULL; diff --git a/components/db_ido_pgsql/schema/upgrade/0.0.11.sql b/components/db_ido_pgsql/schema/upgrade/0.0.11.sql deleted file mode 100644 index d27fed37a..000000000 --- a/components/db_ido_pgsql/schema/upgrade/0.0.11.sql +++ /dev/null @@ -1,14 +0,0 @@ - - --- ----------------------------------------- --- #6094 --- ----------------------------------------- - -ALTER TABLE icinga_hoststatus ADD COLUMN is_reachable INTEGER default 0; -ALTER TABLE icinga_servicestatus ADD COLUMN is_reachable INTEGER default 0; - --- ----------------------------------------- --- set dbversion --- ----------------------------------------- - -SELECT updatedbversion('1.11.3'); diff --git a/components/db_ido_pgsql/schema/upgrade/0.0.8.sql b/components/db_ido_pgsql/schema/upgrade/0.0.8.sql deleted file mode 100644 index 0ac267ee2..000000000 --- a/components/db_ido_pgsql/schema/upgrade/0.0.8.sql +++ /dev/null @@ -1,76 +0,0 @@ - - --- ----------------------------------------- --- #5612 --- ----------------------------------------- -ALTER TABLE icinga_statehistory ADD COLUMN check_source text default NULL; - --- -------------------------------------------------------- --- Icinga 2 specific schema extensions --- -------------------------------------------------------- - --- --- Table structure for table icinga_endpoints --- - -CREATE TABLE IF NOT EXISTS icinga_endpoints ( - endpoint_id bigserial, - instance_id bigint default 0, - endpoint_object_id bigint default 0, - config_type integer default 0, - identity text DEFAULT NULL, - node text DEFAULT NULL, - CONSTRAINT PK_endpoint_id PRIMARY KEY (endpoint_id) , - CONSTRAINT UQ_endpoints UNIQUE (instance_id,config_type,endpoint_object_id) -) ; - --- -------------------------------------------------------- - --- --- Table structure for table icinga_endpointstatus --- - -CREATE TABLE IF NOT EXISTS icinga_endpointstatus ( - endpointstatus_id bigserial, - instance_id bigint default 0, - endpoint_object_id bigint default 0, - status_update_time timestamp with time zone default '1970-01-01 00:00:00', - identity text DEFAULT NULL, - node text DEFAULT NULL, - is_connected integer default 0, - CONSTRAINT PK_endpointstatus_id PRIMARY KEY (endpointstatus_id) , - CONSTRAINT UQ_endpointstatus UNIQUE (endpoint_object_id) -) ; - - -ALTER TABLE icinga_servicestatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_hoststatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_contactstatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_programstatus ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_comments ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_scheduleddowntime ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_runtimevariables ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_customvariablestatus ADD COLUMN endpoint_object_id bigint default NULL; - - -ALTER TABLE icinga_acknowledgements ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_commenthistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_contactnotifications ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_downtimehistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_eventhandlers ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_externalcommands ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_flappinghistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_hostchecks ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_logentries ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_notifications ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_processevents ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_servicechecks ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_statehistory ADD COLUMN endpoint_object_id bigint default NULL; -ALTER TABLE icinga_systemcommands ADD COLUMN endpoint_object_id bigint default NULL; - --- ----------------------------------------- --- set dbversion --- ----------------------------------------- - -SELECT updatedbversion('1.11.0'); - diff --git a/components/db_ido_pgsql/schema/upgrade/0.0.9.sql b/components/db_ido_pgsql/schema/upgrade/0.0.9.sql deleted file mode 100644 index d0fa61510..000000000 --- a/components/db_ido_pgsql/schema/upgrade/0.0.9.sql +++ /dev/null @@ -1,2 +0,0 @@ - -ALTER TABLE icinga_hosts ADD COLUMN check_service_object_id bigint default NULL;