summaryrefslogtreecommitdiff
path: root/app/Schema/Mysql.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 09:42:01 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 09:42:01 -0500
commitde128dbad860478496a0d655b5eb5c1005ebbabe (patch)
tree7fee510e901273472731e8e843981268c593ec40 /app/Schema/Mysql.php
parent0430a09c069134622c0161dc2fb9ba3718a73c0d (diff)
Remove default swimlane
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r--app/Schema/Mysql.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index ca9f45ad..385f63a3 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -2,11 +2,23 @@
namespace Schema;
+require_once __DIR__.'/Migration.php';
+
use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
-const VERSION = 121;
+const VERSION = 122;
+
+function version_122(PDO $pdo)
+{
+ migrate_default_swimlane($pdo);
+
+ $pdo->exec('ALTER TABLE `projects` DROP COLUMN `default_swimlane`');
+ $pdo->exec('ALTER TABLE `projects` DROP COLUMN `show_default_swimlane`');
+ $pdo->exec('ALTER TABLE `tasks` MODIFY `swimlane_id` INT(11) NOT NULL;');
+ $pdo->exec('ALTER TABLE tasks ADD CONSTRAINT tasks_swimlane_ibfk_1 FOREIGN KEY (swimlane_id) REFERENCES swimlanes(id) ON DELETE CASCADE');
+}
function version_121(PDO $pdo)
{