Fixed timezone warning by adding timezone config option

This commit is contained in:
rzeka
2014-02-24 21:08:56 +01:00
parent b4784d39e1
commit e374a6fd64
7 changed files with 24 additions and 5 deletions

View File

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

View File

@@ -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');