From 053289c4a0e6552d5770588a8b78ea9ab4597057 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 27 Feb 2019 09:27:50 -0500 Subject: [PATCH] rename eventserver to eventnotification --- db/zm_create.sql.in | 1 + db/zm_update-1.33.3.sql | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 db/zm_update-1.33.3.sql diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index c4a592897..ea0b42288 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -572,6 +572,7 @@ CREATE TABLE `Servers` ( `zmstats` BOOLEAN NOT NULL DEFAULT FALSE, `zmaudit` BOOLEAN NOT NULL DEFAULT FALSE, `zmtrigger` BOOLEAN NOT NULL DEFAULT FALSE, + `zmeventnotification` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`Id`) ) ENGINE=@ZM_MYSQL_ENGINE@; diff --git a/db/zm_update-1.33.3.sql b/db/zm_update-1.33.3.sql new file mode 100644 index 000000000..5488f809d --- /dev/null +++ b/db/zm_update-1.33.3.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmeventnotification' + ) > 0, + "SELECT 'Column zmeventnotification already exists in Servers'", + "ALTER TABLE Servers ADD `zmeventnotification` BOOLEAN NOT NULL DEFAULT FALSE AFTER `zmtrigger`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt;