2018-12-11 23:28:48 +08:00
|
|
|
--
|
|
|
|
-- This updates a 1.32.3 database to 1.33.0
|
|
|
|
--
|
|
|
|
--
|
2018-12-11 23:37:52 +08:00
|
|
|
-- Remove DefaultView from Monitors table.
|
2018-12-11 23:44:13 +08:00
|
|
|
--
|
2018-12-11 23:37:52 +08:00
|
|
|
|
|
|
|
SET @s = (SELECT IF(
|
|
|
|
(SELECT COUNT(*)
|
|
|
|
FROM INFORMATION_SCHEMA.COLUMNS
|
|
|
|
WHERE table_name = 'Monitors'
|
|
|
|
AND table_schema = DATABASE()
|
|
|
|
AND column_name = 'DefaultView'
|
|
|
|
) > 0,
|
2018-12-12 22:17:14 +08:00
|
|
|
"ALTER TABLE Monitors DROP COLUMN DefaultView",
|
|
|
|
"SELECT 'Column DefaultView no longer exists in Monitors'"
|
2018-12-11 23:37:52 +08:00
|
|
|
));
|
|
|
|
|
|
|
|
PREPARE stmt FROM @s;
|
|
|
|
EXECUTE stmt;
|
2018-12-11 23:28:48 +08:00
|
|
|
|