From b4131431af11c4fdcf741f8aed5eb21edc47036f Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 15 Dec 2021 09:55:03 +0100 Subject: [PATCH] fixed mr --- pandora_console/extras/mr/51.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/mr/51.sql b/pandora_console/extras/mr/51.sql index f1cc0056c0..f701d7c2d3 100644 --- a/pandora_console/extras/mr/51.sql +++ b/pandora_console/extras/mr/51.sql @@ -68,7 +68,6 @@ ALTER TABLE `tipam_network` ADD FOREIGN KEY (`location`) REFERENCES `tipam_netwo ALTER TABLE `tagent_repository` ADD COLUMN `deployment_timeout` INT UNSIGNED DEFAULT 600 AFTER `path`; ALTER TABLE `talert_special_days` ADD COLUMN `id_calendar` int(10) unsigned NOT NULL DEFAULT 1; ALTER TABLE `talert_special_days` ADD COLUMN `day_code` tinyint(2) unsigned NOT NULL DEFAULT 0; -ALTER TABLE `talert_special_days` DROP COLUMN `same_day`; ALTER TABLE `talert_special_days` ADD FOREIGN KEY (`id_calendar`) REFERENCES `talert_calendar`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tipam_network` ADD COLUMN `id_site` bigint unsigned; @@ -91,6 +90,8 @@ UPDATE `talert_special_days` set `day_code` = 5 WHERE `same_day` = 'friday'; UPDATE `talert_special_days` set `day_code` = 6 WHERE `same_day` = 'saturday'; UPDATE `talert_special_days` set `day_code` = 7 WHERE `same_day` = 'sunday'; +ALTER TABLE `talert_special_days` DROP COLUMN `same_day`; + INSERT IGNORE INTO `tipam_network_location` (`name`) SELECT `location` FROM `tipam_network` WHERE `location` <> ''; UPDATE `tipam_network` INNER JOIN `tipam_network_location` ON tipam_network_location.name=tipam_network.location SET tipam_network.location=tipam_network_location.id; UPDATE `tconfig` c1 JOIN (select count(*) as n FROM `tconfig` c2 WHERE (c2.`token` = "node_metaconsole" AND c2.`value` = 1) OR (c2.`token` = "centralized_management" AND c2.`value` = 1) ) v SET c1. `value` = 0 WHERE c1.token = "autocreate_remote_users" AND v.n = 2;