From d2d56b4b89893be9a1b73513017360fc29b1d7f3 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 15 Jun 2017 13:47:20 +0200 Subject: [PATCH] Add a missing MR. --- pandora_console/extras/mr/2.sql | 28 ++++++++++++++++++++++------ pandora_console/extras/mr/3.sql | 5 +++++ pandora_console/pandoradb_data.sql | 2 +- 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 pandora_console/extras/mr/3.sql diff --git a/pandora_console/extras/mr/2.sql b/pandora_console/extras/mr/2.sql index 4b1e944dc1..8b600bdd55 100644 --- a/pandora_console/extras/mr/2.sql +++ b/pandora_console/extras/mr/2.sql @@ -1,9 +1,25 @@ START TRANSACTION; -ALTER TABLE tagent_custom_fields ADD is_password_type tinyint(1) NOT NULL DEFAULT 0; +DROP PROCEDURE IF EXISTS addcol_oum706; + +delimiter '//' +CREATE PROCEDURE addcol_oum706() BEGIN + IF NOT EXISTS ( + SELECT * FROM information_schema.columns WHERE table_name='treport_content' AND column_name='historical_db' + ) THEN + ALTER TABLE treport_content ADD COLUMN historical_db tinyint(1) UNSIGNED NOT NULL default 0; + END IF; + IF NOT EXISTS ( + SELECT * FROM information_schema.columns WHERE table_name='tpolicy_modules' AND column_name='ip_target' + ) THEN + ALTER TABLE tpolicy_modules ADD COLUMN ip_target varchar(100) default ''; + END IF; +END; +// + +delimiter ';' +CALL addcol_oum706(); +DROP PROCEDURE addcol_oum706; + +COMMIT; -ALTER TABLE treport_content ADD COLUMN historical_db tinyint(1) NOT NULL DEFAULT 0; - -ALTER TABLE tpolicy_modules ADD COLUMN ip_target varchar(100) default ''; - -COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/mr/3.sql b/pandora_console/extras/mr/3.sql new file mode 100644 index 0000000000..8ce899bafa --- /dev/null +++ b/pandora_console/extras/mr/3.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE tagent_custom_fields ADD is_password_type tinyint(1) NOT NULL DEFAULT 0; + +COMMIT; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 7772072110..841bbf8fbe 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,7 +109,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 2), +('MR', 3), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), ('current_package_enterprise', '705'),