zoneminder/db/zm_update-1.30.8.sql

18 lines
431 B
MySQL
Raw Normal View History

2016-10-12 21:11:50 +08:00
--
-- This updates a 1.30.7 database to 1.30.8
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Events'
AND table_schema = DATABASE()
AND column_name = 'Orientation'
) > 0,
"SELECT 'Column Orientation exists in Events'",
2016-10-13 04:17:43 +08:00
"ALTER TABLE `Events` ADD `Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0' AFTER `Notes`"
2016-10-12 21:11:50 +08:00
));
PREPARE stmt FROM @s;
EXECUTE stmt;