diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-01-04 22:34:59 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-01-04 22:34:59 -0500 |
commit | 99d27e0ce4f48454808d2325cb407b5b35cf5e88 (patch) | |
tree | 3c518cf08499890d46b9d2f65724d46617e1fc67 /app/Schema | |
parent | d1d04d6feeebeba2aea5333d7a4229fcec799f75 (diff) |
Allow users to override the timezone and the language
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 8 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 8 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 8 |
3 files changed, 21 insertions, 3 deletions
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) { |