[icinga-checkins] icinga.org: icinga-core/master: Set long_output and perfdata to TEXT

git at icinga.org git at icinga.org
Thu Oct 22 13:32:09 CEST 2009


Module: icinga-core
Branch: master
Commit: 354f13a91266cd82160ea4f4c07dd8d4ba5922fb
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=354f13a91266cd82160ea4f4c07dd8d4ba5922fb

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Oct 22 13:29:44 2009 +0200

Set long_output and perfdata to TEXT
added mysql-upgrade-1.0rc.mysql for upgrading

---

 module/idoutils/db/mysql-upgrade-1.0rc.sql |   14 ++++++++++++++
 module/idoutils/db/mysql.sql               |   24 ++++++++++++------------
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/module/idoutils/db/mysql-upgrade-1.0rc.sql b/module/idoutils/db/mysql-upgrade-1.0rc.sql
new file mode 100644
index 0000000..81f573a
--- /dev/null
+++ b/module/idoutils/db/mysql-upgrade-1.0rc.sql
@@ -0,0 +1,14 @@
+ALTER TABLE `icinga_hostchecks` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_hoststatus` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_servicechecks` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_servicestatus` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_statehistory` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_eventhandlers` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_systemcommands` MODIFY COLUMN `long_output` TEXT NOT NULL;
+ALTER TABLE `icinga_notifications` MODIFY COLUMN `long_output` TEXT NOT NULL;
+
+
+ALTER TABLE `icinga_hostchecks` MODIFY COLUMN `perfdata` TEXT NULL;
+ALTER TABLE `icinga_hoststatus` MODIFY COLUMN `perfdata` TEXT NULL;
+ALTER TABLE `icinga_servicechecks` MODIFY COLUMN `perfdata` TEXT NULL;
+ALTER TABLE `icinga_servicestatus` MODIFY COLUMN `perfdata` TEXT NULL;
diff --git a/module/idoutils/db/mysql.sql b/module/idoutils/db/mysql.sql
index 24b7d73..bd09f86 100644
--- a/module/idoutils/db/mysql.sql
+++ b/module/idoutils/db/mysql.sql
@@ -421,7 +421,7 @@ CREATE TABLE IF NOT EXISTS `icinga_eventhandlers` (
   `execution_time` double NOT NULL default '0',
   `return_code` smallint(6) NOT NULL default '0',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
   PRIMARY KEY  (`eventhandler_id`),
   UNIQUE KEY `instance_id` (`instance_id`,`object_id`,`start_time`,`start_time_usec`)
 ) ENGINE=MyISAM COMMENT='Historical host and service event handlers';
@@ -494,8 +494,8 @@ CREATE TABLE IF NOT EXISTS `icinga_hostchecks` (
   `latency` double NOT NULL default '0',
   `return_code` smallint(6) NOT NULL default '0',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
-  `perfdata` varchar(8192) character set latin1 NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
+  `perfdata` TEXT character set latin1 NOT NULL default '',
   PRIMARY KEY  (`hostcheck_id`),
   UNIQUE KEY `instance_id` (`instance_id`,`host_object_id`,`start_time`,`start_time_usec`)
 ) ENGINE=MyISAM  COMMENT='Historical host checks';
@@ -687,8 +687,8 @@ CREATE TABLE IF NOT EXISTS `icinga_hoststatus` (
   `host_object_id` int(11) NOT NULL default '0',
   `status_update_time` datetime NOT NULL default '0000-00-00 00:00:00',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
-  `perfdata` varchar(8192) character set latin1 NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
+  `perfdata` TEXT character set latin1 NOT NULL default '',
   `current_state` smallint(6) NOT NULL default '0',
   `has_been_checked` smallint(6) NOT NULL default '0',
   `should_be_scheduled` smallint(6) NOT NULL default '0',
@@ -845,7 +845,7 @@ CREATE TABLE IF NOT EXISTS `icinga_notifications` (
   `end_time_usec` int(11) NOT NULL default '0',
   `state` smallint(6) NOT NULL default '0',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
   `escalated` smallint(6) NOT NULL default '0',
   `contacts_notified` smallint(6) NOT NULL default '0',
   PRIMARY KEY  (`notification_id`),
@@ -994,8 +994,8 @@ CREATE TABLE IF NOT EXISTS `icinga_servicechecks` (
   `latency` double NOT NULL default '0',
   `return_code` smallint(6) NOT NULL default '0',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
-  `perfdata` varchar(8192) character set latin1 NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
+  `perfdata` TEXT character set latin1 NOT NULL default '',
   PRIMARY KEY  (`servicecheck_id`),
   KEY `instance_id` (`instance_id`),
   KEY `service_object_id` (`service_object_id`),
@@ -1185,8 +1185,8 @@ CREATE TABLE IF NOT EXISTS `icinga_servicestatus` (
   `service_object_id` int(11) NOT NULL default '0',
   `status_update_time` datetime NOT NULL default '0000-00-00 00:00:00',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
-  `perfdata` varchar(8192) character set latin1 NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
+  `perfdata` TEXT character set latin1 NOT NULL default '',
   `current_state` smallint(6) NOT NULL default '0',
   `has_been_checked` smallint(6) NOT NULL default '0',
   `should_be_scheduled` smallint(6) NOT NULL default '0',
@@ -1299,7 +1299,7 @@ CREATE TABLE IF NOT EXISTS `icinga_statehistory` (
   `last_state` smallint(6) NOT NULL default '-1',
   `last_hard_state` smallint(6) NOT NULL default '-1',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
   PRIMARY KEY  (`statehistory_id`)
 ) ENGINE=MyISAM COMMENT='Historical host and service state changes';
 
@@ -1322,7 +1322,7 @@ CREATE TABLE IF NOT EXISTS `icinga_systemcommands` (
   `execution_time` double NOT NULL default '0',
   `return_code` smallint(6) NOT NULL default '0',
   `output` varchar(255) character set latin1 NOT NULL default '',
-  `long_output` varchar(8192) NOT NULL default '',
+  `long_output` TEXT NOT NULL default '',
   PRIMARY KEY  (`systemcommand_id`),
   KEY `instance_id` (`instance_id`),
   KEY `start_time` (`start_time`)





More information about the icinga-checkins mailing list