From 2819585cdbfa26c498c4d544cf093db06869ef04 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 14 Jul 2015 16:09:01 -0400 Subject: [PATCH] move add ServerId to Monitors to zm_update-1.28.100.sql --- db/zm_update-1.28.100.sql | 22 ++++++++++++++++++++++ db/zm_update-1.28.99.sql | 15 --------------- 2 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 db/zm_update-1.28.100.sql diff --git a/db/zm_update-1.28.100.sql b/db/zm_update-1.28.100.sql new file mode 100644 index 000000000..caf56bd22 --- /dev/null +++ b/db/zm_update-1.28.100.sql @@ -0,0 +1,22 @@ +-- +-- This updates a 1.28.10 database to 1.28.99 +-- + +-- +-- Add ServerId column to Monitors +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'ServerId' + ) > 0, +"SELECT 'Column ServerId exists in Monitors'", +"ALTER TABLE Monitors ADD `ServerId` int(10) unsigned AFTER `Name`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.28.99.sql b/db/zm_update-1.28.99.sql index 71eb95317..6ae803f5f 100644 --- a/db/zm_update-1.28.99.sql +++ b/db/zm_update-1.28.99.sql @@ -357,21 +357,6 @@ SET @s = (SELECT IF( )" )); --- --- Add ServerId column to Monitors --- - -SET @s = (SELECT IF( - (SELECT COUNT(*) - FROM INFORMATION_SCHEMA.COLUMNS - WHERE table_name = 'Monitors' - AND table_schema = DATABASE() - AND column_name = 'ServerId' - ) > 0, -"SELECT 'Column ServerId exists in Monitors'", -"ALTER TABLE Monitors ADD `ServerId` int(10) unsigned AFTER `Name`" -)); - PREPARE stmt FROM @s; EXECUTE stmt;