zoneminder/db/zm_update-1.31.5.sql

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

18 lines
384 B
MySQL
Raw Normal View History

2017-09-29 00:23:23 +08:00
--
-- Add StorageId column to Monitors
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Groups'
AND table_schema = DATABASE()
AND column_name = 'ParentId'
) > 0,
"SELECT 'Column GroupId exists in Groups'",
2020-11-24 08:31:21 +08:00
"ALTER TABLE `Groups` ADD `ParentId` int(10) unsigned AFTER `Name`"
2017-09-29 00:23:23 +08:00
));
PREPARE stmt FROM @s;
EXECUTE stmt;