summaryrefslogtreecommitdiff
path: root/app/Schema/Sqlite.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-11 21:11:10 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-11 21:11:10 -0400
commitacba6839a6082e3e3800a733f8baea7c843fc02e (patch)
treee2847dcd13d9ccc3d8f0f6f936a5776df852e11b /app/Schema/Sqlite.php
parenta8418afdebe92dde495bc5010645779c73939b7b (diff)
Add 3 new fields for tasks: start date, time estimated and time spent
Diffstat (limited to 'app/Schema/Sqlite.php')
-rw-r--r--app/Schema/Sqlite.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index cefe8ab5..45a6fb22 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -5,7 +5,14 @@ namespace Schema;
use Core\Security;
use PDO;
-const VERSION = 31;
+const VERSION = 32;
+
+function version_32($pdo)
+{
+ $pdo->exec("ALTER TABLE tasks ADD COLUMN date_started INTEGER");
+ $pdo->exec("ALTER TABLE tasks ADD COLUMN time_spent FLOAT DEFAULT 0");
+ $pdo->exec("ALTER TABLE tasks ADD COLUMN time_estimated FLOAT DEFAULT 0");
+}
function version_31($pdo)
{
@@ -169,8 +176,8 @@ function version_18($pdo)
id INTEGER PRIMARY KEY,
title TEXT COLLATE NOCASE,
status INTEGER DEFAULT 0,
- time_estimated INTEGER DEFAULT 0,
- time_spent INTEGER DEFAULT 0,
+ time_estimated NUMERIC DEFAULT 0,
+ time_spent NUMERIC DEFAULT 0,
task_id INTEGER NOT NULL,
user_id INTEGER,
FOREIGN KEY(task_id) REFERENCES tasks(id) ON DELETE CASCADE