]> granicus.if.org Git - icinga2/commitdiff
DB IDO: Fix datatype for 'check_source' in statehistory table
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 22 Jun 2015 15:02:58 +0000 (17:02 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 22 Jun 2015 15:02:58 +0000 (17:02 +0200)
fixes #9455

lib/db_ido_pgsql/schema/pgsql.sql
lib/db_ido_pgsql/schema/upgrade/2.4.0.sql

index 9d1c1db6ed0a8e713056f7592ade2c2b71b99631..d1ea5aee29d8c611112beffafc26c31f0c90c5d5 100644 (file)
@@ -1315,7 +1315,7 @@ CREATE TABLE  icinga_statehistory (
   last_hard_state INTEGER  default '-1',
   output TEXT  default '',
   long_output TEXT  default '',
-  check_source varchar(255) default NULL,
+  check_source TEXT default '',
   CONSTRAINT PK_statehistory_id PRIMARY KEY (statehistory_id)
 ) ;
 
index 162bfff49217d9c150ba59305192607fe782751e..7ae098a20ef975a68d6f560a81a9e4a43e6051b4 100644 (file)
@@ -116,6 +116,13 @@ ALTER TABLE icinga_systemcommands ALTER COLUMN end_time SET DEFAULT '1970-01-01
 
 ALTER TABLE icinga_endpointstatus ALTER COLUMN status_update_time SET DEFAULT '1970-01-01 00:00:00+00';
 
+-- -----------------------------------------
+-- #9455 check_source data type
+-- -----------------------------------------
+
+ALTER TABLE icinga_statehistory ALTER COLUMN check_source TYPE TEXT;
+ALTER TABLE icinga_statehistory ALTER COLUMN check_source SET default '';
+
 -- -----------------------------------------
 -- update dbversion
 -- -----------------------------------------