update patch on tenants

This commit is contained in:
Keith Woodlock
2013-02-10 20:29:01 +00:00
parent 9a33ca6fb6
commit cb8bc87bf7
@@ -1,2 +1,7 @@
ALTER TABLE tenants MODIFY timezone_id VARCHAR(100) not null; -- timezone are refferd witn names rather than numerics
UPDATE `tenants` SET `timezone_id`='Asia/Kolkata' WHERE `id`=1 LIMIT 1; -- setting Indian time zone
-- modified patch to update column (as nullable first), populate all tenants with indian timezone as default and then set timezone as not null for tenants
USE `mifosplatform-tenants`;
-- timezone are refferd with names rather than numerics
ALTER TABLE `mifosplatform-tenants`.`tenants` CHANGE COLUMN `timezone_id` `timezone_id` VARCHAR(100) NULL DEFAULT NULL;
-- setting Indian time zone
UPDATE `tenants` SET `timezone_id`='Asia/Kolkata' WHERE `id`>0;
ALTER TABLE `mifosplatform-tenants`.`tenants` CHANGE COLUMN `timezone_id` `timezone_id` VARCHAR(100) NOT NULL;