zoneminder/db/zm_update-1.31.8.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
405 B
MySQL
Raw Normal View History

--
-- Add StorageId column to Monitors
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Events'
AND table_schema = DATABASE()
AND column_name = 'DiskSpace'
) > 0,
"SELECT 'Column DiskSpace exists in Events'",
2017-10-12 02:07:01 +08:00
"ALTER TABLE Events ADD `DiskSpace` bigint unsigned default null AFTER `Orientation`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;