From 14fff848760653ab06d9b61f2b65e99479dcf873 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 8 Nov 2023 11:56:32 +0100 Subject: [PATCH] queries remove field transactional_agent pandora_enterprise#12334 --- pandora_console/extras/mr/67.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pandora_console/extras/mr/67.sql diff --git a/pandora_console/extras/mr/67.sql b/pandora_console/extras/mr/67.sql new file mode 100644 index 0000000000..0a5fcd9fb0 --- /dev/null +++ b/pandora_console/extras/mr/67.sql @@ -0,0 +1,13 @@ +START TRANSACTION; + +SET @exist = (SELECT count(*) FROM information_schema.columns WHERE TABLE_NAME='tmetaconsole_agent' AND COLUMN_NAME='transactional_agent' AND table_schema = DATABASE()); +SET @sqlstmt = IF (@exist>0, 'ALTER TABLE `tmetaconsole_agent` DROP COLUMN `transactional_agent`', 'SELECT ""'); +prepare stmt from @sqlstmt; +execute stmt; + +SET @exist = (SELECT count(*) FROM information_schema.columns WHERE TABLE_NAME='tagente' AND COLUMN_NAME='transactional_agent' AND table_schema = DATABASE()); +SET @sqlstmt = IF (@exist>0, 'ALTER TABLE `tagente` DROP COLUMN `transactional_agent`', 'SELECT ""'); +prepare stmt from @sqlstmt; +execute stmt; + +COMMIT;