summaryrefslogtreecommitdiff
path: root/app/Schema
diff options
context:
space:
mode:
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)
{