2018-04-27 05:18:36 +08:00
|
|
|
--
|
|
|
|
-- This updates a 1.31.42 database to 1.31.43
|
|
|
|
--
|
|
|
|
-- Add WebSite enum to Monitor.Type
|
|
|
|
-- Add Refresh column to Monitors table
|
|
|
|
--
|
|
|
|
|
2018-08-28 22:37:02 +08:00
|
|
|
ALTER TABLE `Monitors`
|
2018-04-27 05:18:36 +08:00
|
|
|
CHANGE COLUMN `Type` `Type` ENUM('Local', 'Remote', 'File', 'Ffmpeg', 'Libvlc', 'cURL', 'WebSite') NOT NULL DEFAULT 'Local' ;
|
|
|
|
|
|
|
|
SET @s = (SELECT IF(
|
|
|
|
(SELECT COUNT(*)
|
|
|
|
FROM INFORMATION_SCHEMA.COLUMNS
|
|
|
|
WHERE table_name = 'Monitors'
|
|
|
|
AND table_schema = DATABASE()
|
|
|
|
AND column_name = 'Refresh'
|
|
|
|
) > 0,
|
|
|
|
"SELECT 'Column Refresh exists in Monitors'",
|
2018-07-31 22:22:13 +08:00
|
|
|
"ALTER TABLE Monitors ADD `Refresh` int(10) unsigned default NULL AFTER `ZoneCount`"
|
2018-04-27 05:18:36 +08:00
|
|
|
));
|
|
|
|
|
|
|
|
PREPARE stmt FROM @s;
|
|
|
|
EXECUTE stmt;
|
|
|
|
|