From 6c5484baf074ee0446297627c8f8d3452c07ea8a Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 18 Jun 2020 12:35:52 +0200 Subject: [PATCH] MR change smart services --- pandora_console/extras/mr/39.sql | 7 +++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 7 +++++++ pandora_console/pandoradb.sql | 1 + 3 files changed, 15 insertions(+) create mode 100644 pandora_console/extras/mr/39.sql diff --git a/pandora_console/extras/mr/39.sql b/pandora_console/extras/mr/39.sql new file mode 100644 index 0000000000..70056de503 --- /dev/null +++ b/pandora_console/extras/mr/39.sql @@ -0,0 +1,7 @@ +START TRANSACTION; + +ALTER TABLE `tservice_element` ADD COLUMN `rules` text; + +UPDATE `tservice` SET `auto_calculate`=0; + +COMMIT; \ No newline at end of file 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 b148f0f58d..7ab696009d 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 @@ -1527,6 +1527,13 @@ ALTER TABLE `tservice` ADD COLUMN `cascade_protection` tinyint(1) NOT NULL defau ALTER TABLE `tservice` ADD COLUMN `evaluate_sla` int(1) NOT NULL default 0; ALTER TABLE `tservice` ADD COLUMN `is_favourite` tinyint(1) NOT NULL default 0; UPDATE tservice SET `is_favourite` = 1 WHERE `name` REGEXP '^[_|.|\[|\(]'; +-- ALl previous services are manual now. +UPDATE `tservice` SET `auto_calculate` = 0; + +-- --------------------------------------------------------------------- +-- Table `tservice_element` +-- --------------------------------------------------------------------- +ALTER TABLE `tservice_element` ADD COLUMN `rules` text; -- --------------------------------------------------------------------- -- Table `tlayout` diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 70fce90995..9ad79d7f99 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2724,6 +2724,7 @@ 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, + `rules` text, PRIMARY KEY (`id`) ) ENGINE=InnoDB COMMENT = 'Table to define the modules and the weights of the modules that define a service'