diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-11-02 15:41:58 -0700 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-11-02 15:41:58 -0700 |
commit | 648dc6bcfbdd44947ec58e2f3662c1cc3844d782 (patch) | |
tree | d122630decf0bf4a7a199798835481592424a3b0 /app/Schema | |
parent | 44ae87ac0e9bb37ca6d2b305d410758ff71b42c6 (diff) |
Add predefined templates for task descriptions
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 14 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 13 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 13 |
3 files changed, 37 insertions, 3 deletions
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) { |