diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-18 09:42:01 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-18 09:42:01 -0500 |
commit | de128dbad860478496a0d655b5eb5c1005ebbabe (patch) | |
tree | 7fee510e901273472731e8e843981268c593ec40 /app/Schema/Postgres.php | |
parent | 0430a09c069134622c0161dc2fb9ba3718a73c0d (diff) |
Remove default swimlane
Diffstat (limited to 'app/Schema/Postgres.php')
-rw-r--r-- | app/Schema/Postgres.php | 15 |
1 files changed, 14 insertions, 1 deletions
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) { |