diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index 8db9dc91ab..7e5ad2136d 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -85,4 +85,7 @@ INSERT INTO `tconfig`(`token`, `value`) VALUES ('welcome_state', -1); ALTER TABLE `tcredential_store` MODIFY COLUMN `product` enum('CUSTOM', 'AWS', 'AZURE', 'GOOGLE', 'SAP') default 'CUSTOM'; +ALTER TABLE `tmetaconsole_agent_secondary_group` ADD INDEX `id_tagente` (`id_tagente`); +ALTER TABLE `tmetaconsole_event` ADD INDEX `server_id` (`server_id`); + COMMIT; diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 42706ea5d0..b1abc15bfa 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -967,6 +967,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` ( ALTER TABLE `tmetaconsole_event` ADD COLUMN `data` double(22,5) default NULL; ALTER TABLE `tmetaconsole_event` ADD COLUMN `module_status` int(4) NOT NULL default '0'; +ALTER TABLE `tmetaconsole_event` ADD INDEX `server_id` (`server_id`); -- --------------------------------------------------------------------- -- Table `tmetaconsole_event_history` @@ -1942,6 +1943,7 @@ create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`( ALTER TABLE tagente ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0'; ALTER TABLE tmetaconsole_agent ADD COLUMN `update_secondary_groups` tinyint(1) NOT NULL default '0'; ALTER TABLE tusuario_perfil ADD COLUMN `no_hierarchy` tinyint(1) NOT NULL default '0'; +ALTER TABLE `tmetaconsole_agent_secondary_group` ADD INDEX `id_tagente` (`id_tagente`); -- --------------------------------------------------------------------- -- Table `tautoconfig` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 71bcdc4dcb..5af3038086 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3123,6 +3123,7 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` ( PRIMARY KEY (`id_evento`), KEY `idx_agente` (`id_agente`), KEY `idx_agentmodule` (`id_agentmodule`), + KEY `server_id` (`server_id`), KEY `idx_utimestamp` USING BTREE (`utimestamp`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- Criticity: 0 - Maintance (grey) @@ -3435,6 +3436,7 @@ create table IF NOT EXISTS `tmetaconsole_agent_secondary_group`( `id_tmetaconsole_setup` int(10) NOT NULL, `id_group` mediumint(4) unsigned NOT NULL, PRIMARY KEY(`id`), + KEY `id_tagente` (`id_tagente`), FOREIGN KEY(`id_agent`) REFERENCES tmetaconsole_agent(`id_agente`) ON DELETE CASCADE, FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`)