[icinga-checkins] icinga.org: icinga-core/mfriedrich/ido: Bugfix: Changed default value for start/end/acknowledgement timestamp to NULL.

git at icinga.org git at icinga.org
Tue Nov 22 15:06:59 CET 2011


Module: icinga-core
Branch: mfriedrich/ido
Commit: 3a56389c1db8fc82ac09fe4d2d2f2e991cd7465f
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=3a56389c1db8fc82ac09fe4d2d2f2e991cd7465f

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Nov 17 14:16:47 2011 +0100

Bugfix: Changed default value for start/end/acknowledgement timestamp to NULL.

---

 module/idoutils/db/mysql/mysql.sql                 |    6 +++---
 .../db/mysql/upgrade/mysql-upgrade-1.6.0.sql       |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/module/idoutils/db/mysql/mysql.sql b/module/idoutils/db/mysql/mysql.sql
index 715aa41..1491334 100644
--- a/module/idoutils/db/mysql/mysql.sql
+++ b/module/idoutils/db/mysql/mysql.sql
@@ -1376,9 +1376,9 @@ CREATE TABLE IF NOT EXISTS icinga_timeperiod_timeranges (
 CREATE TABLE IF NOT EXISTS icinga_slahistory (
   slahistory_id serial,
   instance_id bigint unsigned default 0,
-  start_time timestamp default '0000-00-00 00:00:00',
-  end_time timestamp default '0000-00-00 00:00:00',
-  acknowledgement_time timestamp default '0000-00-00 00:00:00',
+  start_time timestamp null default NULL,
+  end_time timestamp null default NULL,
+  acknowledgement_time timestamp null default NULL,
   object_id bigint unsigned default 0,
   state smallint default 0,
   state_type smallint default '0',
diff --git a/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql b/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql
index ef30957..acbfbb3 100644
--- a/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql
+++ b/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql
@@ -20,9 +20,9 @@ ALTER TABLE icinga_acknowledgements ADD end_time timestamp default '0000-00-00 0
 CREATE TABLE IF NOT EXISTS icinga_slahistory (
   slahistory_id serial,
   instance_id bigint unsigned default 0,
-  start_time timestamp default '0000-00-00 00:00:00',
-  end_time timestamp default '0000-00-00 00:00:00',
-  acknowledgement_time timestamp default '0000-00-00 00:00:00',
+  start_time timestamp null default NULL,
+  end_time timestamp null default NULL,
+  acknowledgement_time timestamp null default NULL,
   object_id bigint unsigned default 0,
   state smallint default 0,
   state_type smallint default '0',





More information about the icinga-checkins mailing list