mirror of https://github.com/Icinga/icinga2.git
DB IDO: Make check_source a varchar(255) column
fixes #10069 Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
parent
b4c56e5f47
commit
759818d289
|
@ -713,7 +713,7 @@ CREATE TABLE IF NOT EXISTS icinga_hoststatus (
|
|||
output TEXT character set latin1 default '',
|
||||
long_output TEXT default '',
|
||||
perfdata TEXT character set latin1 default '',
|
||||
check_source TEXT character set latin1 default '',
|
||||
check_source varchar(255) character set latin1 default '',
|
||||
current_state smallint default 0,
|
||||
has_been_checked smallint default 0,
|
||||
should_be_scheduled smallint default 0,
|
||||
|
@ -1200,7 +1200,7 @@ CREATE TABLE IF NOT EXISTS icinga_servicestatus (
|
|||
output TEXT character set latin1 default '',
|
||||
long_output TEXT default '',
|
||||
perfdata TEXT character set latin1 default '',
|
||||
check_source TEXT character set latin1 default '',
|
||||
check_source varchar(255) character set latin1 default '',
|
||||
current_state smallint default 0,
|
||||
has_been_checked smallint default 0,
|
||||
should_be_scheduled smallint default 0,
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
-- -----------------------------------------
|
||||
-- upgrade path for Icinga 2.5.0
|
||||
--
|
||||
-- -----------------------------------------
|
||||
-- Copyright (c) 2016 Icinga Development Team (http://www.icinga.org)
|
||||
--
|
||||
-- Please check http://docs.icinga.org for upgrading information!
|
||||
-- -----------------------------------------
|
||||
|
||||
-- -----------------------------------------
|
||||
-- #10069 IDO: check_source should not be a TEXT field
|
||||
-- -----------------------------------------
|
||||
|
||||
ALTER TABLE icinga_hoststatus MODIFY COLUMN check_source varchar(255) character set latin1 default '';
|
||||
ALTER TABLE icinga_servicestatus MODIFY COLUMN check_source varchar(255) character set latin1 default '';
|
||||
|
||||
-- -----------------------------------------
|
||||
-- set dbversion
|
||||
-- -----------------------------------------
|
||||
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.14.1', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.14.1', modify_time=NOW();
|
|
@ -739,7 +739,7 @@ CREATE TABLE icinga_hoststatus (
|
|||
output TEXT default '',
|
||||
long_output TEXT default '',
|
||||
perfdata TEXT default '',
|
||||
check_source TEXT default '',
|
||||
check_source varchar(255) default '',
|
||||
current_state INTEGER default 0,
|
||||
has_been_checked INTEGER default 0,
|
||||
should_be_scheduled INTEGER default 0,
|
||||
|
@ -1226,7 +1226,7 @@ CREATE TABLE icinga_servicestatus (
|
|||
output TEXT default '',
|
||||
long_output TEXT default '',
|
||||
perfdata TEXT default '',
|
||||
check_source TEXT default '',
|
||||
check_source varchar(255) default '',
|
||||
current_state INTEGER default 0,
|
||||
has_been_checked INTEGER default 0,
|
||||
should_be_scheduled INTEGER default 0,
|
||||
|
@ -1323,7 +1323,7 @@ CREATE TABLE icinga_statehistory (
|
|||
last_hard_state INTEGER default '-1',
|
||||
output TEXT default '',
|
||||
long_output TEXT default '',
|
||||
check_source TEXT default '',
|
||||
check_source varchar(255) default '',
|
||||
CONSTRAINT PK_statehistory_id PRIMARY KEY (statehistory_id)
|
||||
) ;
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
-- -----------------------------------------
|
||||
-- upgrade path for Icinga 2.5.0
|
||||
--
|
||||
-- -----------------------------------------
|
||||
-- Copyright (c) 2016 Icinga Development Team (http://www.icinga.org)
|
||||
--
|
||||
-- Please check http://docs.icinga.org for upgrading information!
|
||||
-- -----------------------------------------
|
||||
|
||||
-- -----------------------------------------
|
||||
-- #10069 IDO: check_source should not be a TEXT field
|
||||
-- -----------------------------------------
|
||||
|
||||
ALTER TABLE icinga_hoststatus ALTER COLUMN check_source TYPE varchar(255);
|
||||
ALTER TABLE icinga_servicestatus ALTER COLUMN check_source TYPE varchar(255);
|
||||
ALTER TABLE icinga_statehistory ALTER COLUMN check_source TYPE varchar(255);
|
||||
|
||||
-- -----------------------------------------
|
||||
-- set dbversion
|
||||
-- -----------------------------------------
|
||||
|
||||
SELECT updatedbversion('1.14.1');
|
Loading…
Reference in New Issue