From 99d27e0ce4f48454808d2325cb407b5b35cf5e88 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 4 Jan 2015 22:34:59 -0500 Subject: Allow users to override the timezone and the language --- app/Schema/Mysql.php | 8 +++++++- app/Schema/Postgres.php | 8 +++++++- app/Schema/Sqlite.php | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) (limited to 'app/Schema') diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 25ef86d5..05e8f14c 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -5,7 +5,13 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 40; +const VERSION = 41; + +function version_41($pdo) +{ + $pdo->exec('ALTER TABLE users ADD COLUMN timezone VARCHAR(50)'); + $pdo->exec('ALTER TABLE users ADD COLUMN language CHAR(5)'); +} function version_40($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 75d184de..9d5aa7a7 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -5,7 +5,13 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 21; +const VERSION = 22; + +function version_22($pdo) +{ + $pdo->exec('ALTER TABLE users ADD COLUMN timezone VARCHAR(50)'); + $pdo->exec('ALTER TABLE users ADD COLUMN language CHAR(5)'); +} function version_21($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 39a40ace..c6156065 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -5,7 +5,13 @@ namespace Schema; use Core\Security; use PDO; -const VERSION = 39; +const VERSION = 40; + +function version_40($pdo) +{ + $pdo->exec('ALTER TABLE users ADD COLUMN timezone TEXT'); + $pdo->exec('ALTER TABLE users ADD COLUMN language TEXT'); +} function version_39($pdo) { -- cgit v1.2.3