From ba0455d8e43d6eb26dbb7e48d2d50da24366c992 Mon Sep 17 00:00:00 2001 From: Miodrag Tokić Date: Tue, 22 May 2018 15:38:11 +0200 Subject: Increase size of the "users.language" column The current schema definition for the language column in the users table is limited to 5 characters, while the longest currently available language code in Kanboard is 10 characters long - sr_Latn_RS. This limitation prevents switching to Serbian as the application interface language. As per the currently available ISO 639 language codes this column should be at least 11 characters in size. Examples of language codes of 11 characters in size are en-US-POSIX and shi_Latn_MA. References: - http://www.localeplanet.com/icu/iso639.html --- app/Schema/Mysql.php | 7 ++++++- app/Schema/Postgres.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'app/Schema') diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index efeefd9c..7d8c0993 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 = 130; +const VERSION = 131; + +function version_131(PDO $pdo) +{ + $pdo->exec("ALTER TABLE `users` MODIFY `language` VARCHAR(11) DEFAULT NULL"); +} /* diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 598ea115..bd2ba1e1 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 = 108; +const VERSION = 109; + +function version_109(PDO $pdo) +{ + $pdo->exec('ALTER TABLE "users" ALTER COLUMN "language" TYPE VARCHAR(11)'); +} function version_108(PDO $pdo) { -- cgit v1.2.3