Files
cbsnexora-backend/mifosng-db/patchesPutOnDemoServer20130315/05a-modify_tenant_timezoneid.sql
T
2013-03-15 18:00:36 +05:30

7 lines
562 B
SQL
Executable File

-- 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;