From cf8bae66d119e83c3c40acb4b5472b3e462ce911 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 26 Nov 2019 10:31:57 +0100 Subject: [PATCH] Added index in MR --- pandora_console/extras/mr/33.sql | 3 +++ pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 ++ pandora_console/pandoradb.sql | 2 ++ 3 files changed, 7 insertions(+) diff --git a/pandora_console/extras/mr/33.sql b/pandora_console/extras/mr/33.sql index bfe1777e63..b3092d6423 100644 --- a/pandora_console/extras/mr/33.sql +++ b/pandora_console/extras/mr/33.sql @@ -50,4 +50,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 9d182b0a54..29dcdac099 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 @@ -931,6 +931,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` @@ -1906,6 +1907,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 28bb83d287..9b9301e8e5 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3109,6 +3109,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) @@ -3421,6 +3422,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`)