diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/base.php | 2 | ||||
-rw-r--r-- | models/schema.php | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/models/base.php b/models/base.php index 3c071623..e512e9db 100644 --- a/models/base.php +++ b/models/base.php @@ -17,7 +17,7 @@ require __DIR__.'/schema.php'; abstract class Base { const APP_VERSION = 'master'; - const DB_VERSION = 3; + const DB_VERSION = 4; const DB_FILENAME = 'data/db.sqlite'; private static $dbInstance = null; diff --git a/models/schema.php b/models/schema.php index 84926d73..3704aad1 100644 --- a/models/schema.php +++ b/models/schema.php @@ -2,6 +2,14 @@ namespace Schema; +function version_4($pdo) +{ + $pdo->exec('ALTER TABLE config ADD column timezone TEXT'); + + //set default timezone to UTC + $pdo->exec('UPDATE config SET timezone = \'UTC\''); +} + function version_3($pdo) { $pdo->exec('ALTER TABLE projects ADD column token TEXT'); |