diff --git a/schema/mysql/schema.sql b/schema/mysql/schema.sql index 36135c29f..02dffc0b4 100644 --- a/schema/mysql/schema.sql +++ b/schema/mysql/schema.sql @@ -240,7 +240,9 @@ CREATE TABLE hostgroup ( PRIMARY KEY (id), - INDEX idx_hostgroup_name (name) COMMENT 'Host/service/host group list filtered by host group name' + INDEX idx_hostgroup_display_name (display_name) COMMENT 'Hostgroup list filtered/ordered by display_name', + INDEX idx_hostgroup_name_ci (name_ci) COMMENT 'Hostgroup list filtered using quick search', + INDEX idx_hostgroup_name (name) COMMENT 'Host/service/host group list filtered by host group name; Hostgroup detail filter' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC; CREATE TABLE hostgroup_member ( @@ -404,7 +406,9 @@ CREATE TABLE servicegroup ( PRIMARY KEY (id), - INDEX idx_servicegroup_name (name) COMMENT 'Host/service/service group list filtered by service group name' + INDEX idx_servicegroup_display_name (display_name) COMMENT 'Servicegroup list filtered/ordered by display_name', + INDEX idx_servicegroup_name_ci (name_ci) COMMENT 'Servicegroup list filtered using quick search', + INDEX idx_servicegroup_name (name) COMMENT 'Host/service/service group list filtered by service group name; Servicegroup detail filter' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC; CREATE TABLE servicegroup_member ( diff --git a/schema/mysql/upgrades/1.2.0.sql b/schema/mysql/upgrades/1.2.0.sql new file mode 100644 index 000000000..34a27cfaa --- /dev/null +++ b/schema/mysql/upgrades/1.2.0.sql @@ -0,0 +1,11 @@ +ALTER TABLE hostgroup + ADD INDEX idx_hostgroup_display_name (display_name) COMMENT 'Hostgroup list filtered/ordered by display_name', + ADD INDEX idx_hostgroup_name_ci (name_ci) COMMENT 'Hostgroup list filtered using quick search', + DROP INDEX idx_hostgroup_name, + ADD INDEX idx_hostgroup_name (name) COMMENT 'Host/service/host group list filtered by host group name; Hostgroup detail filter'; + +ALTER TABLE servicegroup + ADD INDEX idx_servicegroup_display_name (display_name) COMMENT 'Servicegroup list filtered/ordered by display_name', + ADD INDEX idx_servicegroup_name_ci (name_ci) COMMENT 'Servicegroup list filtered using quick search', + DROP INDEX idx_servicegroup_name, + ADD INDEX idx_servicegroup_name (name) COMMENT 'Host/service/service group list filtered by service group name; Servicegroup detail filter';