add Enabled to Storage

This commit is contained in:
Isaac Connor 2020-03-04 10:15:44 -05:00
parent 2f48c442cc
commit d59bc4ca6d
1 changed files with 12 additions and 0 deletions

12
db/zm_update-1.35.1.sql Normal file
View File

@ -0,0 +1,12 @@
SET @s = (SELECT IF(
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
AND table_name = 'Storage'
AND column_name = 'Enabled'
) > 0,
"SELECT 'Column Enabled already exists in Storage'",
"ALTER TABLE `Storage` ADD `Enabled` BOOLEAN NOT NULL default true AFTER `DoDelete`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;