From 754091b55da7062531768c5471956ee0bb96422b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 21 Jun 2015 09:30:23 -0400 Subject: [PATCH] Added isRunning column --- db/zm_update-1.28.99.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/db/zm_update-1.28.99.sql b/db/zm_update-1.28.99.sql index 3aab54345..d8b41c18e 100644 --- a/db/zm_update-1.28.99.sql +++ b/db/zm_update-1.28.99.sql @@ -324,4 +324,20 @@ WHERE NOT EXISTS ( -- UPDATE `zm`.`Config` SET `Category`='hidden' WHERE `Name`='ZM_USE_DEEP_STORAGE'; +--- The States table will be updated to have a new column called IsActive +--- used to keep track of which custom state is active (if any) +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'States' + AND table_schema = DATABASE() + AND column_name = 'IsActive' + ) > 0, +"SELECT 'Column IsActive exists in States'", +"ALTER TABLE `States` ADD `IsActive` tinyint(3) unsigned not null default 0 AFTER `Definition`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; +