summaryrefslogtreecommitdiff
path: root/app/Schema/Postgres.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/Postgres.php
parenta8418afdebe92dde495bc5010645779c73939b7b (diff)
Add 3 new fields for tasks: start date, time estimated and time spent
Diffstat (limited to 'app/Schema/Postgres.php')
-rw-r--r--app/Schema/Postgres.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index fe2cce54..e42e8e72 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -5,7 +5,17 @@ namespace Schema;
use PDO;
use Core\Security;
-const VERSION = 12;
+const VERSION = 13;
+
+function version_13($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");
+
+ $pdo->exec("ALTER TABLE task_has_subtasks ALTER COLUMN time_estimated TYPE FLOAT");
+ $pdo->exec("ALTER TABLE task_has_subtasks ALTER COLUMN time_spent TYPE FLOAT");
+}
function version_12($pdo)
{