Started adding timezone support
This commit is contained in:
parent
33e075ecdc
commit
478237e60f
14 changed files with 191 additions and 9 deletions
17
setup/sql/upgrade-00005.sql
Normal file
17
setup/sql/upgrade-00005.sql
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Header section
|
||||
# Define incrementing schema version number
|
||||
SET @schema_version = '5';
|
||||
|
||||
-- {{#each tables.subscription}}
|
||||
|
||||
# Adds new column 'tz' to subscriptions table
|
||||
# Indicates subscriber time zone, use UTC as default
|
||||
ALTER TABLE `{{this}}` ADD COLUMN `tz` varchar(100) CHARACTER SET ascii DEFAULT NULL AFTER `opt_in_country`;
|
||||
CREATE INDEX subscriber_tz ON `{{this}}` (`tz`);
|
||||
|
||||
-- {{/each}}
|
||||
|
||||
# Footer section
|
||||
LOCK TABLES `settings` WRITE;
|
||||
INSERT INTO `settings` (`key`, `value`) VALUES('db_schema_version', @schema_version) ON DUPLICATE KEY UPDATE `value`=@schema_version;
|
||||
UNLOCK TABLES;
|
|
@ -1,6 +1,6 @@
|
|||
# This file is a handlebars template
|
||||
# To modify several similar tables at once use (replace [] with {}):
|
||||
# [[#each tablename]] ALTER TABLE `[[this]]` ... [[/each]]
|
||||
# [[#each tables.tablename]] ALTER TABLE `[[this]]` ... [[/each]]
|
||||
# NB! as this is a handlebars file, then remember to escape any template sequences
|
||||
|
||||
# Header section
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue