schema/mysql: case sensitive varnames

fixes #11911
This commit is contained in:
Thomas Gelf 2016-09-09 06:59:13 +00:00
parent 421c154e08
commit 4d34a8ade1
2 changed files with 24 additions and 6 deletions

View File

@ -0,0 +1,18 @@
ALTER TABLE icinga_command_var
MODIFY COLUMN varname VARCHAR(255) NOT NULL COLLATE utf8_bin;
ALTER TABLE icinga_host_var
MODIFY COLUMN varname VARCHAR(255) NOT NULL COLLATE utf8_bin;
ALTER TABLE icinga_service_var
MODIFY COLUMN varname VARCHAR(255) NOT NULL COLLATE utf8_bin;
ALTER TABLE icinga_user_var
MODIFY COLUMN varname VARCHAR(255) NOT NULL COLLATE utf8_bin;
ALTER TABLE icinga_notification_var
MODIFY COLUMN varname VARCHAR(255) NOT NULL COLLATE utf8_bin;
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (108, NOW());

View File

@ -351,7 +351,7 @@ CREATE TABLE icinga_command_field (
CREATE TABLE icinga_command_var (
command_id INT(10) UNSIGNED NOT NULL,
varname VARCHAR(255) NOT NULL,
varname VARCHAR(255) NOT NULL COLLATE utf8_bin,
varvalue TEXT DEFAULT NULL,
format ENUM('string', 'expression', 'json') NOT NULL DEFAULT 'string',
PRIMARY KEY (command_id, varname),
@ -516,7 +516,7 @@ CREATE TABLE icinga_host_field (
CREATE TABLE icinga_host_var (
host_id INT(10) UNSIGNED NOT NULL,
varname VARCHAR(255) NOT NULL,
varname VARCHAR(255) NOT NULL COLLATE utf8_bin,
varvalue TEXT DEFAULT NULL,
format enum ('string', 'json', 'expression'), -- immer string vorerst
PRIMARY KEY (host_id, varname),
@ -612,7 +612,7 @@ CREATE TABLE icinga_service_inheritance (
CREATE TABLE icinga_service_var (
service_id INT(10) UNSIGNED NOT NULL,
varname VARCHAR(255) NOT NULL,
varname VARCHAR(255) NOT NULL COLLATE utf8_bin,
varvalue TEXT DEFAULT NULL,
format enum ('string', 'json', 'expression'),
PRIMARY KEY (service_id, varname),
@ -860,7 +860,7 @@ CREATE TABLE icinga_user_types_set (
CREATE TABLE icinga_user_var (
user_id INT(10) UNSIGNED NOT NULL,
varname VARCHAR(255) NOT NULL,
varname VARCHAR(255) NOT NULL COLLATE utf8_bin,
varvalue TEXT DEFAULT NULL,
format ENUM('string', 'json', 'expression') NOT NULL DEFAULT 'string',
PRIMARY KEY (user_id, varname),
@ -994,7 +994,7 @@ CREATE TABLE icinga_notification (
CREATE TABLE icinga_notification_var (
notification_id INT(10) UNSIGNED NOT NULL,
varname VARCHAR(255) NOT NULL,
varname VARCHAR(255) NOT NULL COLLATE utf8_bin,
varvalue TEXT DEFAULT NULL,
format enum ('string', 'json', 'expression'),
PRIMARY KEY (notification_id, varname),
@ -1313,4 +1313,4 @@ CREATE TABLE sync_run (
INSERT INTO director_schema_migration
SET migration_time = NOW(),
schema_version = 107;
schema_version = 108;