[icinga-checkins] icinga.org: icinga-core/gbeutner/sla-test: Bugfix: Changed default value for start/end timestamp to NULL.

git at icinga.org git at icinga.org
Thu Nov 17 13:57:37 CET 2011


Module: icinga-core
Branch: gbeutner/sla-test
Commit: b1ba7f52c619e18332d5326c6e61aa9d04f882fb
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=b1ba7f52c619e18332d5326c6e61aa9d04f882fb

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

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

---

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

diff --git a/module/idoutils/db/mysql/mysql.sql b/module/idoutils/db/mysql/mysql.sql
index 84a942e..813a707 100644
--- a/module/idoutils/db/mysql/mysql.sql
+++ b/module/idoutils/db/mysql/mysql.sql
@@ -1376,8 +1376,8 @@ 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',
+  start_time timestamp default NULL,
+  end_time timestamp default NULL,
   acknowledgement_time timestamp default NULL,
   object_id bigint unsigned default 0,
   state 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 a214ace..dd52c0b 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,8 +20,8 @@ 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',
+  start_time timestamp default NULL,
+  end_time timestamp default NULL,
   acknowledgement_time timestamp default NULL,
   object_id bigint unsigned default 0,
   state smallint default 0,





More information about the icinga-checkins mailing list