diff --git a/schema/mysql-changes/upgrade_25.sql b/schema/mysql-changes/upgrade_25.sql new file mode 100644 index 00000000..f4d2d90b --- /dev/null +++ b/schema/mysql-changes/upgrade_25.sql @@ -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); diff --git a/schema/mysql.sql b/schema/mysql.sql index 58fd15a9..98fed078 100644 --- a/schema/mysql.sql +++ b/schema/mysql.sql @@ -805,8 +805,10 @@ CREATE TABLE icinga_usergroup_parent ( CREATE TABLE import_source ( id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL, source_name VARCHAR(64) NOT NULL, + key_column VARCHAR(64) NOT NULL, provider_class VARCHAR(72) NOT NULL, - PRIMARY KEY (id) + PRIMARY KEY (id), + INDEX search_idx (key_column) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE import_source_setting (