summaryrefslogtreecommitdiff
path: root/app/Schema/Sqlite.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-12-26 17:43:13 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-12-26 17:43:13 -0500
commitcf821e117ce8b937cff7f386a107aaa81ba6bf9b (patch)
tree6075f4d1c5192f45e8b13479bc67f973b046fdf2 /app/Schema/Sqlite.php
parent2b27d986b374923a266c132ac0a67fb515d30d1c (diff)
Add swimlanes
Diffstat (limited to 'app/Schema/Sqlite.php')
-rw-r--r--app/Schema/Sqlite.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index 8efe8d30..cd319241 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -5,7 +5,26 @@ namespace Schema;
use Core\Security;
use PDO;
-const VERSION = 36;
+const VERSION = 37;
+
+function version_37($pdo)
+{
+ $pdo->exec("
+ CREATE TABLE swimlanes (
+ id INTEGER PRIMARY KEY,
+ name TEXT,
+ position INTEGER DEFAULT 1,
+ is_active INTEGER DEFAULT 1,
+ project_id INTEGER,
+ FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
+ UNIQUE (name, project_id)
+ )
+ ");
+
+ $pdo->exec('ALTER TABLE tasks ADD COLUMN swimlane_id INTEGER DEFAULT 0');
+ $pdo->exec("ALTER TABLE projects ADD COLUMN default_swimlane TEXT DEFAULT '".t('Default swimlane')."'");
+ $pdo->exec("ALTER TABLE projects ADD COLUMN show_default_swimlane INTEGER DEFAULT 1");
+}
function version_36($pdo)
{
@@ -462,7 +481,7 @@ function version_1($pdo)
$pdo->exec("
CREATE TABLE tasks (
id INTEGER PRIMARY KEY,
- title TEXT NOT NULL,
+ title TEXT NOCASE NOT NULL,
description TEXT,
date_creation INTEGER,
color_id TEXT,