zoneminder/db/zm_update-1.31.9.sql

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

18 lines
407 B
MySQL
Raw Normal View History

2017-10-12 22:50:43 +08:00
--
-- Add Type column to Storage
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Storage'
AND table_schema = DATABASE()
AND column_name = 'Type'
) > 0,
2017-10-16 23:30:28 +08:00
"SELECT 'Column Type already exists in Storage'",
2017-10-12 22:50:43 +08:00
"ALTER TABLE Storage ADD `Type` enum('local','s3fs') NOT NULL default 'local' AFTER `Name`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;