diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-24 20:38:39 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-24 20:38:39 -0500 |
commit | 051bf1c9dbb5733242c7657d6d507389206b33ee (patch) | |
tree | 9f1a61fa8558dd572b7c577f51599586e3c48a7e /app/Schema | |
parent | 60f3d7f83d23014f9cfb7d8494d6cebd2f8b24a3 (diff) |
Add configurable task priority
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 10 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 10 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 10 |
3 files changed, 27 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index ad7f7be1..8f1db510 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,15 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 102; +const VERSION = 103; + +function version_103(PDO $pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_default INT DEFAULT 0"); + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_start INT DEFAULT 0"); + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_end INT DEFAULT 3"); + $pdo->exec("ALTER TABLE tasks ADD COLUMN priority INT DEFAULT 0"); +} function version_102(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index d23a7723..a7bf8054 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,15 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 82; +const VERSION = 83; + +function version_83(PDO $pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_default INTEGER DEFAULT 0"); + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_start INTEGER DEFAULT 0"); + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_end INTEGER DEFAULT 3"); + $pdo->exec("ALTER TABLE tasks ADD COLUMN priority INTEGER DEFAULT 0"); +} function version_82(PDO $pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index daa70f54..08689749 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,15 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 94; +const VERSION = 95; + +function version_95(PDO $pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_default INTEGER DEFAULT 0"); + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_start INTEGER DEFAULT 0"); + $pdo->exec("ALTER TABLE projects ADD COLUMN priority_end INTEGER DEFAULT 3"); + $pdo->exec("ALTER TABLE tasks ADD COLUMN priority INTEGER DEFAULT 0"); +} function version_94(PDO $pdo) { |