schema/mysql: require key column name for imports

This commit is contained in:
Thomas Gelf 2015-07-21 15:11:00 +02:00
parent d97d276156
commit c00d708327
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,2 @@
ALTER TABLE import_source ADD COLUMN key_column VARCHAR(64) NOT NULL AFTER source_name;
ALTER TABLE import_source ADD INDEX search_idx (key_column);

View File

@ -805,8 +805,10 @@ CREATE TABLE icinga_usergroup_parent (
CREATE TABLE import_source ( CREATE TABLE import_source (
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL, id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
source_name VARCHAR(64) NOT NULL, source_name VARCHAR(64) NOT NULL,
key_column VARCHAR(64) NOT NULL,
provider_class VARCHAR(72) NOT NULL, provider_class VARCHAR(72) NOT NULL,
PRIMARY KEY (id) PRIMARY KEY (id),
INDEX search_idx (key_column)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE import_source_setting ( CREATE TABLE import_source_setting (