From: Michael Friedrich Date: Wed, 13 Aug 2014 14:47:38 +0000 (+0200) Subject: DB IDO: Add endpoint_name to programstatus table X-Git-Tag: v2.1.0~62^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f3c6b454fb01225886f2063a007af90d7f04865;p=icinga2 DB IDO: Add endpoint_name to programstatus table refs #6827 refs #6203 --- diff --git a/components/db_ido_mysql/idomysqlconnection.cpp b/components/db_ido_mysql/idomysqlconnection.cpp index 661609f57..0ae4db4c5 100644 --- a/components/db_ido_mysql/idomysqlconnection.cpp +++ b/components/db_ido_mysql/idomysqlconnection.cpp @@ -33,7 +33,7 @@ using namespace icinga; -#define SCHEMA_VERSION "1.11.6" +#define SCHEMA_VERSION "1.11.7" REGISTER_TYPE(IdoMysqlConnection); REGISTER_STATSFUNCTION(IdoMysqlConnectionStats, &IdoMysqlConnection::StatsFunc); diff --git a/components/db_ido_mysql/schema/mysql.sql b/components/db_ido_mysql/schema/mysql.sql index e8d7698bb..44c52df35 100644 --- a/components/db_ido_mysql/schema/mysql.sql +++ b/components/db_ido_mysql/schema/mysql.sql @@ -900,6 +900,7 @@ CREATE TABLE IF NOT EXISTS icinga_programstatus ( status_update_time timestamp default '0000-00-00 00:00:00', program_start_time timestamp default '0000-00-00 00:00:00', program_end_time timestamp default '0000-00-00 00:00:00', + endpoint_name varchar(255) character set latin1 collate latin1_general_cs default NULL, is_currently_running smallint default 0, process_id bigint unsigned default 0, daemon_mode smallint default 0, diff --git a/components/db_ido_mysql/schema/upgrade/2.1.0.sql b/components/db_ido_mysql/schema/upgrade/2.1.0.sql new file mode 100644 index 000000000..68d732eee --- /dev/null +++ b/components/db_ido_mysql/schema/upgrade/2.1.0.sql @@ -0,0 +1,17 @@ +-- ----------------------------------------- +-- upgrade path for Icinga 2.1.0 +-- +-- ----------------------------------------- +-- Copyright (c) 2014 Icinga Development Team (http://www.icinga.org) +-- +-- Please check http://docs.icinga.org for upgrading information! +-- ----------------------------------------- + +ALTER TABLE `icinga_programstatus` ADD COLUMN `endpoint_name` varchar(255) character set latin1 collate latin1_general_cs default NULL; + +-- ----------------------------------------- +-- update dbversion +-- ----------------------------------------- + +INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.7', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.7', modify_time=NOW(); + diff --git a/components/db_ido_pgsql/idopgsqlconnection.cpp b/components/db_ido_pgsql/idopgsqlconnection.cpp index ec85d89c4..adf4ef3eb 100644 --- a/components/db_ido_pgsql/idopgsqlconnection.cpp +++ b/components/db_ido_pgsql/idopgsqlconnection.cpp @@ -34,7 +34,7 @@ using namespace icinga; -#define SCHEMA_VERSION "1.11.6" +#define SCHEMA_VERSION "1.11.7" REGISTER_TYPE(IdoPgsqlConnection); diff --git a/components/db_ido_pgsql/schema/pgsql.sql b/components/db_ido_pgsql/schema/pgsql.sql index 516c67132..6a3533be5 100644 --- a/components/db_ido_pgsql/schema/pgsql.sql +++ b/components/db_ido_pgsql/schema/pgsql.sql @@ -928,6 +928,7 @@ CREATE TABLE icinga_programstatus ( program_start_time timestamp with time zone default '1970-01-01 00:00:00', program_end_time timestamp with time zone default '1970-01-01 00:00:00', is_currently_running INTEGER default 0, + endpoint_name TEXT default '', process_id bigint default 0, daemon_mode INTEGER default 0, last_command_check timestamp with time zone default '1970-01-01 00:00:00', diff --git a/components/db_ido_pgsql/schema/upgrade/2.1.0.sql b/components/db_ido_pgsql/schema/upgrade/2.1.0.sql new file mode 100644 index 000000000..8a749e8ee --- /dev/null +++ b/components/db_ido_pgsql/schema/upgrade/2.1.0.sql @@ -0,0 +1,17 @@ +-- ----------------------------------------- +-- upgrade path for Icinga 2.1.0 +-- +-- ----------------------------------------- +-- Copyright (c) 2014 Icinga Development Team (http://www.icinga.org) +-- +-- Please check http://docs.icinga.org for upgrading information! +-- ----------------------------------------- + +ALTER TABLE icinga_programstatus ADD COLUMN endpoint_name TEXT default NULL; + +-- ----------------------------------------- +-- update dbversion +-- ----------------------------------------- + +SELECT updatedbversion('1.11.7'); +