Allow to associate tags to colors

The color is then used as background in the board, list and task details
views
This commit is contained in:
Julian Maurice
2018-08-09 21:35:11 +02:00
parent ae3ade0908
commit 9d4cd31e1a
24 changed files with 69 additions and 27 deletions

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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)
);

View File

@@ -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)
{