From 648dc6bcfbdd44947ec58e2f3662c1cc3844d782 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 2 Nov 2017 15:41:58 -0700 Subject: Add predefined templates for task descriptions --- app/Schema/Mysql.php | 14 +++++++++++++- app/Schema/Postgres.php | 13 ++++++++++++- app/Schema/Sqlite.php | 13 ++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) (limited to 'app/Schema') diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index ca284f47..5709b86d 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -8,7 +8,19 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 125; +const VERSION = 126; + +function version_126(PDO $pdo) +{ + $pdo->exec('CREATE TABLE predefined_task_descriptions ( + id INT NOT NULL AUTO_INCREMENT, + project_id INT NOT NULL, + title TEXT NOT NULL, + description TEXT NOT NULL, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE, + PRIMARY KEY(id) + ) ENGINE=InnoDB CHARSET=utf8'); +} function version_125(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 312b1dba..bf9acaa7 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -8,7 +8,18 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 104; +const VERSION = 105; + +function version_105(PDO $pdo) +{ + $pdo->exec('CREATE TABLE predefined_task_descriptions ( + id SERIAL PRIMARY KEY, + project_id INTEGER NOT NULL, + title TEXT NOT NULL, + description TEXT NOT NULL, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE + )'); +} function version_104(PDO $pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 3966d373..70d13b98 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -8,7 +8,18 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 115; +const VERSION = 116; + +function version_116(PDO $pdo) +{ + $pdo->exec('CREATE TABLE predefined_task_descriptions ( + id INTEGER PRIMARY KEY, + project_id INTEGER NOT NULL, + title TEXT NOT NULL, + description TEXT NOT NULL, + FOREIGN KEY(project_id) REFERENCES projects(id) ON DELETE CASCADE + )'); +} function version_115(PDO $pdo) { -- cgit v1.2.3