Fix alter index

This commit is contained in:
Jose Gonzalez 2020-09-16 17:32:05 +02:00
parent dbb1ec6b84
commit da01f9abd5
3 changed files with 24 additions and 24 deletions

View File

@ -1,14 +1,14 @@
START TRANSACTION;
CREATE INDEX `tme_timestamp_idx` ON tmetaconsole_event (`timestamp`) ALGORITHM DEFAULT LOCK DEFAULT;
CREATE INDEX `tme_module_status_idx` ON tmetaconsole_event (`module_status`) ALGORITHM DEFAULT LOCK DEFAULT;
CREATE INDEX `tme_criticity_idx` ON tmetaconsole_event (`criticity`) ALGORITHM DEFAULT LOCK DEFAULT;
CREATE INDEX `tme_agent_name_idx` ON tmetaconsole_event (`agent_name`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event ADD INDEX `tme_timestamp_idx` (`timestamp`);
ALTER TABLE tmetaconsole_event ADD INDEX `tme_module_status_idx` (`module_status`);
ALTER TABLE tmetaconsole_event ADD INDEX `tme_criticity_idx` (`criticity`);
ALTER TABLE tmetaconsole_event ADD INDEX `tme_agent_name_idx` (`agent_name`);
CREATE INDEX `tma_id_os_idx` ON tmetaconsole_agent (`id_os`) ALGORITHM DEFAULT LOCK DEFAULT;
CREATE INDEX `tma_server_name_idx` ON tmetaconsole_agent (`server_name`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_agent ADD INDEX `tma_id_os_idx` (`id_os`);
ALTER TABLE tmetaconsole_agent ADD INDEX `tma_server_name_idx` (`server_name`);
CREATE INDEX `tmeh_estado_idx` ON tmetaconsole_event_history (`timestamp`) ALGORITHM DEFAULT LOCK DEFAULT;
CREATE INDEX `tmeh_timestamp_idx` ON tmetaconsole_event_history (`estado`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event_history ADD INDEX `tmeh_estado_idx` (`estado`);
ALTER TABLE tmetaconsole_event_history ADD INDEX `tmeh_timestamp_idx` (`timestamp`);
COMMIT;

View File

@ -978,10 +978,10 @@ 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`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_timestamp_idx` (`timestamp`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_module_status_idx` (`module_status`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_criticity_idx` (`criticity`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_agent_name_idx` (`agent_name`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_timestamp_idx` (`timestamp`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_module_status_idx` (`module_status`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_criticity_idx` (`criticity`);
ALTER TABLE `tmetaconsole_event` ADD INDEX `tme_agent_name_idx` (`agent_name`);
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_event_history`
@ -1030,8 +1030,8 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event_history` (
ALTER TABLE `tmetaconsole_event_history` ADD COLUMN `data` double(22,5) default NULL;
ALTER TABLE `tmetaconsole_event_history` ADD COLUMN `module_status` int(4) NOT NULL default '0';
ALTER TABLE `tmetaconsole_event_history` ADD INDEX `tmeh_estado_idx` (`estado`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE `tmetaconsole_event_history` ADD INDEX `tmeh_timestamp_idx` (`timestamp`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE `tmetaconsole_event_history` ADD INDEX `tmeh_estado_idx` (`estado`);
ALTER TABLE `tmetaconsole_event_history` ADD INDEX `tmeh_timestamp_idx` (`timestamp`);
-- ---------------------------------------------------------------------
-- Table `textension_translate_string`
-- ---------------------------------------------------------------------
@ -1126,8 +1126,8 @@ ALTER TABLE `tmetaconsole_agent` ADD COLUMN `remote` tinyint(1) NOT NULL DEFAULT
MODIFY COLUMN `update_secondary_groups` tinyint(1) NOT NULL DEFAULT '0',
MODIFY COLUMN `alias_as_name` tinyint(2) NOT NULL DEFAULT '0',
ADD INDEX `id_tagente_idx` (`id_tagente`),
ADD INDEX `tma_id_os_idx` (`id_os`) ALGORITHM DEFAULT LOCK DEFAULT,
ADD INDEX `tma_server_name_idx` (`server_name`) ALGORITHM DEFAULT LOCK DEFAULT;
ADD INDEX `tma_id_os_idx` (`id_os`),
ADD INDEX `tma_server_name_idx` (`server_name`);
-- ---------------------------------------------------------------------
-- Table `ttransaction`

View File

@ -3227,10 +3227,10 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event` (
-- Criticity: 5 - Minor
-- Criticity: 6 - Major
ALTER TABLE tmetaconsole_event ADD INDEX `tme_timestamp_idx` (`timestamp`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event ADD INDEX `tme_module_status_idx` (`module_status`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event ADD INDEX `tme_criticity_idx` (`criticity`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event ADD INDEX `tme_agent_name_idx` (`agent_name`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event ADD INDEX `tme_timestamp_idx` (`timestamp`);
ALTER TABLE tmetaconsole_event ADD INDEX `tme_module_status_idx` (`module_status`);
ALTER TABLE tmetaconsole_event ADD INDEX `tme_criticity_idx` (`criticity`);
ALTER TABLE tmetaconsole_event ADD INDEX `tme_agent_name_idx` (`agent_name`);
-- ---------------------------------------------------------------------
-- Table `tmetaconsole_event_history`
@ -3279,8 +3279,8 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_event_history` (
-- Criticity: 5 - Minor
-- Criticity: 6 - Major
ALTER TABLE tmetaconsole_event_history ADD INDEX `tmeh_estado_idx` (`estado`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event_history ADD INDEX `tmeh_timestamp_idx` (`timestamp`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_event_history ADD INDEX `tmeh_estado_idx` (`estado`);
ALTER TABLE tmetaconsole_event_history ADD INDEX `tmeh_timestamp_idx` (`timestamp`);
-- ---------------------------------------------------------------------
-- Table `textension_translate_string`
@ -3369,8 +3369,8 @@ CREATE TABLE IF NOT EXISTS `tmetaconsole_agent` (
FOREIGN KEY (`id_tmetaconsole_setup`) REFERENCES tmetaconsole_setup(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE tmetaconsole_agent ADD INDEX `tma_id_os_idx` (`id_os`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_agent ADD INDEX `tma_server_name_idx` (`server_name`) ALGORITHM DEFAULT LOCK DEFAULT;
ALTER TABLE tmetaconsole_agent ADD INDEX `tma_id_os_idx` (`id_os`);
ALTER TABLE tmetaconsole_agent ADD INDEX `tma_server_name_idx` (`server_name`);
-- ---------------------------------------------------------------------
-- Table `ttransaction`