[icinga-checkins] icinga.org: icinga2/master: DB IDO: Change alias column to varchar(255) in MySQL

git at icinga.org git at icinga.org
Thu Jul 7 18:48:31 CEST 2016


Module: icinga2
Branch: master
Commit: ca42b4658a257aee80a5be31171d5569ce048163
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=ca42b4658a257aee80a5be31171d5569ce048163

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Jul  7 18:48:09 2016 +0200

DB IDO: Change alias column to varchar(255) in MySQL

fixes #10061

---

 lib/db_ido_mysql/schema/mysql.sql         |   12 ++++++------
 lib/db_ido_mysql/schema/upgrade/2.5.0.sql |   10 ++++++++++
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/lib/db_ido_mysql/schema/mysql.sql b/lib/db_ido_mysql/schema/mysql.sql
index 61c6bd2..45b87a2 100644
--- a/lib/db_ido_mysql/schema/mysql.sql
+++ b/lib/db_ido_mysql/schema/mysql.sql
@@ -180,7 +180,7 @@ CREATE TABLE IF NOT EXISTS icinga_contactgroups (
   instance_id bigint unsigned default 0,
   config_type smallint default 0,
   contactgroup_object_id bigint unsigned default 0,
-  alias TEXT character set latin1  default '',
+  alias varchar(255) character set latin1  default '',
   PRIMARY KEY  (contactgroup_id),
   UNIQUE KEY instance_id (instance_id,config_type,contactgroup_object_id)
 ) ENGINE=InnoDB  COMMENT='Contactgroup definitions';
@@ -249,7 +249,7 @@ CREATE TABLE IF NOT EXISTS icinga_contacts (
   instance_id bigint unsigned default 0,
   config_type smallint default 0,
   contact_object_id bigint unsigned default 0,
-  alias TEXT character set latin1  default '',
+  alias varchar(255) character set latin1  default '',
   email_address varchar(255) character set latin1  default '',
   pager_address varchar(64) character set latin1  default '',
   host_timeperiod_object_id bigint unsigned default 0,
@@ -606,7 +606,7 @@ CREATE TABLE IF NOT EXISTS icinga_hostgroups (
   instance_id bigint unsigned default 0,
   config_type smallint default 0,
   hostgroup_object_id bigint unsigned default 0,
-  alias TEXT character set latin1  default '',
+  alias varchar(255) character set latin1  default '',
   notes TEXT character set latin1  default NULL,
   notes_url TEXT character set latin1  default NULL,
   action_url TEXT character set latin1  default NULL,
@@ -639,7 +639,7 @@ CREATE TABLE IF NOT EXISTS icinga_hosts (
   instance_id bigint unsigned default 0,
   config_type smallint default 0,
   host_object_id bigint unsigned default 0,
-  alias TEXT character set latin1  default '',
+  alias varchar(255) character set latin1  default '',
   display_name varchar(255) character set latin1 collate latin1_general_cs  default '',
   address varchar(128) character set latin1  default '',
   address6 varchar(128) character set latin1  default '',
@@ -1100,7 +1100,7 @@ CREATE TABLE IF NOT EXISTS icinga_servicegroups (
   instance_id bigint unsigned default 0,
   config_type smallint default 0,
   servicegroup_object_id bigint unsigned default 0,
-  alias TEXT character set latin1  default '',
+  alias varchar(255) character set latin1  default '',
   notes TEXT character set latin1  default NULL,
   notes_url TEXT character set latin1  default NULL,
   action_url TEXT character set latin1  default NULL,
@@ -1336,7 +1336,7 @@ CREATE TABLE IF NOT EXISTS icinga_timeperiods (
   instance_id bigint unsigned default 0,
   config_type smallint default 0,
   timeperiod_object_id bigint unsigned default 0,
-  alias TEXT character set latin1  default '',
+  alias varchar(255) character set latin1  default '',
   PRIMARY KEY  (timeperiod_id),
   UNIQUE KEY instance_id (instance_id,config_type,timeperiod_object_id)
 ) ENGINE=InnoDB  COMMENT='Timeperiod definitions';
diff --git a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
index 07ed960..5f6b47c 100644
--- a/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
+++ b/lib/db_ido_mysql/schema/upgrade/2.5.0.sql
@@ -28,6 +28,16 @@ CREATE INDEX idx_scheduleddowntime_object_id on icinga_scheduleddowntime(object_
 ALTER TABLE icinga_hoststatus MODIFY COLUMN current_notification_number int unsigned default 0;
 ALTER TABLE icinga_servicestatus MODIFY COLUMN current_notification_number int unsigned default 0;
 
+-- -----------------------------------------
+-- #10061
+-- -----------------------------------------
+
+ALTER TABLE icinga_contactgroups MODIFY COLUMN alias varchar(255) character set latin1  default '';
+ALTER TABLE icinga_contacts MODIFY COLUMN alias varchar(255) character set latin1  default '';
+ALTER TABLE icinga_hostgroups MODIFY COLUMN alias varchar(255) character set latin1  default '';
+ALTER TABLE icinga_hosts MODIFY COLUMN alias varchar(255) character set latin1  default '';
+ALTER TABLE icinga_servicegroups MODIFY COLUMN alias varchar(255) character set latin1  default '';
+ALTER TABLE icinga_timeperiods MODIFY COLUMN alias varchar(255) character set latin1  default '';
 
 -- -----------------------------------------
 -- #10066



More information about the icinga-checkins mailing list