Added index to service elements (modules)

This commit is contained in:
fbsanchez 2022-01-10 11:24:32 +01:00
parent cc58138f11
commit 46d995a983
3 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
START TRANSACTION;
ALTER TABLE `tpolicy_queue` MODIFY COLUMN `progress` int(10) NOT NULL default '0';
CREATE INDEX `IDX_tservice_element` ON `tservice_element`(`id_service`,`id_agente_modulo`);
COMMIT;

View File

@ -480,7 +480,8 @@ CREATE TABLE IF NOT EXISTS `tservice_element` (
`id_agent` int(10) unsigned NOT NULL default 0,
`id_service_child` int(10) unsigned NOT NULL default 0,
`id_server_meta` int(10) unsigned NOT NULL default 0,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
INDEX `IDX_tservice_element` (`id_service`,`id_agente_modulo`)
) ENGINE=InnoDB
COMMENT = 'Table to define the modules and the weights of the modules that define a service'
DEFAULT CHARSET=utf8;

View File

@ -2856,7 +2856,8 @@ CREATE TABLE IF NOT EXISTS `tservice_element` (
`id_service_child` int(10) unsigned NOT NULL default 0,
`id_server_meta` int(10) unsigned NOT NULL default 0,
`rules` text,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
INDEX `IDX_tservice_element` (`id_service`,`id_agente_modulo`)
) ENGINE=InnoDB
COMMENT = 'Table to define the modules and the weights of the modules that define a service'
DEFAULT CHARSET=utf8;