summaryrefslogtreecommitdiff
path: root/app/Schema/Mysql.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/Mysql.php
parent2b27d986b374923a266c132ac0a67fb515d30d1c (diff)
Add swimlanes
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r--app/Schema/Mysql.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index 32953656..7fc8da6a 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -5,7 +5,27 @@ namespace Schema;
use PDO;
use Core\Security;
-const VERSION = 37;
+const VERSION = 38;
+
+function version_38($pdo)
+{
+ $pdo->exec("
+ CREATE TABLE swimlanes (
+ id INT NOT NULL AUTO_INCREMENT,
+ name VARCHAR(200) NOT NULL,
+ position INT DEFAULT 1,
+ is_active INT DEFAULT 1,
+ project_id INT,
+ PRIMARY KEY(id),
+ FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE,
+ UNIQUE (name, project_id)
+ ) ENGINE=InnoDB CHARSET=utf8
+ ");
+
+ $pdo->exec('ALTER TABLE tasks ADD COLUMN swimlane_id INT DEFAULT 0');
+ $pdo->exec("ALTER TABLE projects ADD COLUMN default_swimlane VARCHAR(200) DEFAULT '".t('Default swimlane')."'");
+ $pdo->exec("ALTER TABLE projects ADD COLUMN show_default_swimlane INT DEFAULT 1");
+}
function version_37($pdo)
{