put sql update into zm_update-1.33.0.sql

This commit is contained in:
Isaac Connor 2018-12-11 10:37:52 -05:00
parent 278abbc201
commit 4e4c7502c3
1 changed files with 18 additions and 0 deletions

18
db/zm_update-1.33.0.sql Normal file
View File

@ -0,0 +1,18 @@
--
-- This updates a 1.32.* database to 1.33.0
--
-- Remove DefaultView from Monitors table.
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'DefaultView'
) > 0,
"ALTER TABLE Monitors DROP COLUMN DefaultView"
"SELECT 'Column DefaultView no longer exists in Monitors'",
));
PREPARE stmt FROM @s;
EXECUTE stmt;