add in the required updated file

This commit is contained in:
Isaac Connor 2017-01-17 12:10:00 -05:00
parent d63972ac3b
commit ff1b369a99
1 changed files with 19 additions and 0 deletions

19
db/zm_update-1.30.11.sql Normal file
View File

@ -0,0 +1,19 @@
--
-- This updates a 1.30.10 database to 1.30.11
--
-- Add StateId Column to Events.
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Events'
AND table_schema = DATABASE()
AND column_name = 'StateId'
) > 0,
"SELECT 'Column StateId exists in Events'",
"ALTER TABLE Events ADD `StateId` int(10) unsigned default NULL AFTER `Notes`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;