zoneminder/db/zm_update-1.37.10.sql

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

21 lines
449 B
MySQL
Raw Normal View History

2022-01-23 01:30:59 +08:00
--
-- Update Config table to have Private
--
SELECT 'Checking for Private in Config';
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Config'
AND table_schema = DATABASE()
AND column_name = 'Private'
) > 0,
"SELECT 'Column Private already exists in Config'",
"ALTER TABLE `Config` ADD COLUMN `Private` BOOLEAN NOT NULL DEFAULT FALSE AFTER `Readonly`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;