summaryrefslogtreecommitdiff
path: root/app/Schema
diff options
context:
space:
mode:
authorJulian Maurice <julian.maurice@biblibre.com>2018-08-09 21:35:11 +0200
committerJulian Maurice <julian.maurice@biblibre.com>2018-08-11 10:15:13 +0200
commit9d4cd31e1aae02e9980932c67036fdfe574e3432 (patch)
tree6fca71d93aaed9032a0d771a0b8111d79fdc99b6 /app/Schema
parentae3ade0908bae350488260ee5d878a2ffbff605a (diff)
Allow to associate tags to colors
The color is then used as background in the board, list and task details views
Diffstat (limited to 'app/Schema')
-rw-r--r--app/Schema/Mysql.php7
-rw-r--r--app/Schema/Postgres.php7
-rw-r--r--app/Schema/Sql/mysql.sql1
-rw-r--r--app/Schema/Sql/postgres.sql3
-rw-r--r--app/Schema/Sqlite.php7
5 files changed, 21 insertions, 4 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index a5074a43..5b70f2a3 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
-const VERSION = 132;
+const VERSION = 133;
+
+function version_133(PDO $pdo)
+{
+ $pdo->exec('ALTER TABLE `tags` ADD COLUMN `color_id` VARCHAR(50) DEFAULT NULL');
+}
function version_132(PDO $pdo)
{
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index cd4e0fac..f66b307d 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
-const VERSION = 110;
+const VERSION = 111;
+
+function version_111(PDO $pdo)
+{
+ $pdo->exec('ALTER TABLE "tags" ADD COLUMN "color_id" VARCHAR(50) DEFAULT NULL');
+}
function version_110(PDO $pdo)
{
diff --git a/app/Schema/Sql/mysql.sql b/app/Schema/Sql/mysql.sql
index b626013a..6bf6773f 100644
--- a/app/Schema/Sql/mysql.sql
+++ b/app/Schema/Sql/mysql.sql
@@ -522,6 +522,7 @@ CREATE TABLE `tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`project_id` int(11) NOT NULL,
+ `color_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `project_id` (`project_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
diff --git a/app/Schema/Sql/postgres.sql b/app/Schema/Sql/postgres.sql
index c0ea275b..68f78b27 100644
--- a/app/Schema/Sql/postgres.sql
+++ b/app/Schema/Sql/postgres.sql
@@ -927,7 +927,8 @@ ALTER SEQUENCE "swimlanes_id_seq" OWNED BY "swimlanes"."id";
CREATE TABLE "tags" (
"id" integer NOT NULL,
"name" character varying(255) NOT NULL,
- "project_id" integer NOT NULL
+ "project_id" integer NOT NULL,
+ "color_id" character varying(255)
);
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index 7889b133..1a61c315 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -8,7 +8,12 @@ use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role;
use PDO;
-const VERSION = 119;
+const VERSION = 120;
+
+function version_120(PDO $pdo)
+{
+ $pdo->exec('ALTER TABLE tags ADD COLUMN color_id TEXT DEFAULT NULL');
+}
function version_119(PDO $pdo)
{