From de128dbad860478496a0d655b5eb5c1005ebbabe Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 18 Feb 2017 09:42:01 -0500 Subject: Remove default swimlane --- app/Schema/Postgres.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'app/Schema/Postgres.php') diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index cbea908f..cc3d9632 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -2,11 +2,24 @@ namespace Schema; +require_once __DIR__.'/Migration.php'; + use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 100; +const VERSION = 101; + +function version_101(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" ALTER COLUMN "swimlane_id" SET NOT NULL'); + $pdo->exec('ALTER TABLE "tasks" ALTER COLUMN "swimlane_id" DROP DEFAULT'); + $pdo->exec('ALTER TABLE "tasks" ADD FOREIGN KEY (swimlane_id) REFERENCES swimlanes ON DELETE CASCADE'); +} function version_100(PDO $pdo) { -- cgit v1.2.3