mirror of https://github.com/Icinga/icinga2.git
DB IDO: Add program_version column to programstatus table
Bump schema version to 1.11.8 fixes #7391
This commit is contained in:
parent
a895a6236a
commit
3fd20d56aa
|
@ -50,6 +50,8 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
|
|||
|
||||
#### Changes
|
||||
|
||||
* DB IDO schema update to version `1.11.8`
|
||||
* schema files in `lib/db_ido_{mysql,pgsql}/schema`
|
||||
* New CLI commands #7245
|
||||
* `icinga2-{enable,disable}-feature` tool = cli command `icinga2 feature {enable,disable}` #7250
|
||||
* `icinga2-list-objects` tool = cli command `icinga2 object list` #7251
|
||||
|
|
|
@ -118,6 +118,7 @@ void DbConnection::ProgramStatusHandler(void)
|
|||
|
||||
query2.Fields = make_shared<Dictionary>();
|
||||
query2.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
|
||||
query2.Fields->Set("program_version", Application::GetVersion());
|
||||
query2.Fields->Set("status_update_time", DbValue::FromTimestamp(Utility::GetTime()));
|
||||
query2.Fields->Set("program_start_time", DbValue::FromTimestamp(Application::GetStartTime()));
|
||||
query2.Fields->Set("is_currently_running", 1);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
#define SCHEMA_VERSION "1.11.7"
|
||||
#define SCHEMA_VERSION "1.11.8"
|
||||
|
||||
REGISTER_TYPE(IdoMysqlConnection);
|
||||
REGISTER_STATSFUNCTION(IdoMysqlConnectionStats, &IdoMysqlConnection::StatsFunc);
|
||||
|
|
|
@ -897,6 +897,7 @@ CREATE TABLE IF NOT EXISTS icinga_processevents (
|
|||
CREATE TABLE IF NOT EXISTS icinga_programstatus (
|
||||
programstatus_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
instance_id bigint unsigned default 0,
|
||||
program_version varchar(64) character set latin1 collate latin1_general_cs default NULL,
|
||||
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',
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
-- -----------------------------------------
|
||||
-- upgrade path for Icinga 2.2.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 `program_version` varchar(64) 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.8', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.8', modify_time=NOW();
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
#define SCHEMA_VERSION "1.11.7"
|
||||
#define SCHEMA_VERSION "1.11.8"
|
||||
|
||||
REGISTER_TYPE(IdoPgsqlConnection);
|
||||
|
||||
|
|
|
@ -924,6 +924,7 @@ CREATE TABLE icinga_processevents (
|
|||
CREATE TABLE icinga_programstatus (
|
||||
programstatus_id bigserial,
|
||||
instance_id bigint default 0,
|
||||
program_version TEXT default NULL,
|
||||
status_update_time timestamp with time zone default '1970-01-01 00:00:00',
|
||||
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',
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
-- -----------------------------------------
|
||||
-- upgrade path for Icinga 2.2.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 program_version TEXT default NULL;
|
||||
|
||||
-- -----------------------------------------
|
||||
-- update dbversion
|
||||
-- -----------------------------------------
|
||||
|
||||
SELECT updatedbversion('1.11.8');
|
||||
|
Loading…
Reference in New Issue