]> granicus.if.org Git - icinga2/commitdiff
Fix customvariables in DB IDO MySQL are not case sensitive
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 23 Jul 2014 16:06:57 +0000 (18:06 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 23 Jul 2014 16:06:57 +0000 (18:06 +0200)
fixes #6608

ChangeLog
components/db_ido_mysql/idomysqlconnection.cpp
components/db_ido_mysql/schema/mysql.sql
components/db_ido_mysql/schema/upgrade/2.0.2.sql
components/db_ido_pgsql/idopgsqlconnection.cpp
components/db_ido_pgsql/schema/pgsql.sql
components/db_ido_pgsql/schema/upgrade/2.0.2.sql
doc/1-about.md
doc/2-getting-started.md

index 06644b94f36b9662fc3ddf8a78d9b70880919caf..0a961b00b6a942494dea9cd38ba6410a1c213e74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,12 @@ Please check doc/1-about.md.
 
 ## What's New
 
+### What's New in Version 2.0.2
+
+#### Changes
+
+* DB IDO schema upgrade required (new schema version: 1.11.6)
+
 ### What's New in Version 2.0.1
 
 * Bug #6316: application fails to start on wrong log file permissions but does not tell about it
index 664a648c88e6dc2350378e04f2615d06371a8ab6..088ce25bf4e45fd1ad9e17bb572bb1d16fc400bf 100644 (file)
@@ -33,7 +33,7 @@
 
 using namespace icinga;
 
-#define SCHEMA_VERSION "1.11.3"
+#define SCHEMA_VERSION "1.11.6"
 
 REGISTER_TYPE(IdoMysqlConnection);
 REGISTER_STATSFUNCTION(IdoMysqlConnectionStats, &IdoMysqlConnection::StatsFunc);
index bf97f3138946eec4693b2b5595376751e1670793..e8d7698bb8fa9a34bdf0d28057a8346a8bb5cb3f 100644 (file)
@@ -337,7 +337,7 @@ CREATE TABLE IF NOT EXISTS icinga_customvariables (
   object_id bigint unsigned default 0,
   config_type smallint default 0,
   has_been_modified smallint default 0,
-  varname varchar(255) character set latin1  default '',
+  varname varchar(255) character set latin1 collate latin1_general_cs default NULL,
   varvalue TEXT character set latin1  default '',
   PRIMARY KEY  (customvariable_id),
   UNIQUE KEY object_id_2 (object_id,config_type,varname),
@@ -356,7 +356,7 @@ CREATE TABLE IF NOT EXISTS icinga_customvariablestatus (
   object_id bigint unsigned default 0,
   status_update_time timestamp  default '0000-00-00 00:00:00',
   has_been_modified smallint default 0,
-  varname varchar(255) character set latin1  default '',
+  varname varchar(255) character set latin1 collate latin1_general_cs default NULL,
   varvalue TEXT character set latin1  default '',
   PRIMARY KEY  (customvariablestatus_id),
   UNIQUE KEY object_id_2 (object_id,varname),
@@ -1600,6 +1600,6 @@ CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, co
 -- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
-INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.3', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.3', modify_time=NOW();
+INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.6', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.6', modify_time=NOW();
 
 
index 8bd871b1a026819f4fca2b1f738fbb85072a17a2..1e9b428cb32c242bbd66e0ed7ab55ae0bad8d644 100644 (file)
@@ -8,3 +8,13 @@
 -- -----------------------------------------
 
 UPDATE icinga_objects SET name2 = NULL WHERE name2 = '';
+
+ALTER TABLE `icinga_customvariables` MODIFY COLUMN `varname` varchar(255) character set latin1 collate latin1_general_cs default NULL;
+ALTER TABLE `icinga_customvariablestatus` MODIFY COLUMN `varname` varchar(255) character set latin1 collate latin1_general_cs default NULL;
+
+-- -----------------------------------------
+-- update dbversion
+-- -----------------------------------------
+
+INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.6', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.6', modify_time=NOW();
+
index 917569fcf4be8d476db07611268a4f5d72002a0a..530e837e94bfbe3e44ce8ae2584ae10ec7f2cc9e 100644 (file)
@@ -34,7 +34,7 @@
 
 using namespace icinga;
 
-#define SCHEMA_VERSION "1.11.3"
+#define SCHEMA_VERSION "1.11.6"
 
 REGISTER_TYPE(IdoPgsqlConnection);
 
index dd1789f8a06c769fcecdef1d85660da5ce416ee8..516c6713244428a42f377a286d1225de76b504d9 100644 (file)
@@ -1629,5 +1629,5 @@ CREATE INDEX commenthistory_delete_idx ON icinga_commenthistory (instance_id, co
 -- set dbversion
 -- -----------------------------------------
 
-SELECT updatedbversion('1.11.3');
+SELECT updatedbversion('1.11.6');
 
index 8bd871b1a026819f4fca2b1f738fbb85072a17a2..c583005871ab3bdfd1a21745b91f8bb2f3023187 100644 (file)
@@ -8,3 +8,10 @@
 -- -----------------------------------------
 
 UPDATE icinga_objects SET name2 = NULL WHERE name2 = '';
+
+-- -----------------------------------------
+-- update dbversion
+-- -----------------------------------------
+
+SELECT updatedbversion('1.11.6');
+
index 0f3bbd66df24ebe7158b259a87cddab73456c7c9..2acf57b4c085890811cf7dfa7f458135f2c4f0ad 100644 (file)
@@ -46,6 +46,12 @@ Icinga 2 is available as [Vagrant Demo VM](#vagrant).
 
 ## <a id="whats-new"></a> What's new
 
+### What's New in Version 2.0.2
+
+#### Changes
+
+* DB IDO schema upgrade required (new schema version: 1.11.6)
+
 ### What's New in Version 2.0.1
 
 * Bug #6316: application fails to start on wrong log file permissions but does not tell about it
index 03d8e7cf20573f677935a31f4e1657e21cfa2f2f..fb01fab74506928a2ac755987cb236c1be03037f 100644 (file)
@@ -451,9 +451,11 @@ by a number of projects including Icinga Web 1.x, Reporting or Icinga Web 2.
 There is a separate module for each database back-end. At present support for
 both MySQL and PostgreSQL is implemented.
 
-Icinga 2 uses the Icinga 1.x IDOUtils database schema starting with version
-`1.11.3`. Icinga 2 requires additional features not yet released with older
-Icinga 1.x versions.
+Icinga 2 uses the Icinga 1.x IDOUtils database schema. Icinga 2 requires additional
+features not yet released with older Icinga 1.x versions.
+
+* Current required schema version: `1.11.6`.
+
 
 > **Tip**
 >