diff options
author | Miodrag Tokić <miki@denimo.io> | 2018-05-22 15:38:11 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-05-25 01:07:35 -0700 |
commit | ba0455d8e43d6eb26dbb7e48d2d50da24366c992 (patch) | |
tree | e2b9a4c20b2a096258a794383fbd288a01aa286d /app | |
parent | 5b17d232e069b2323e1cf5d573d4fbcf23822dec (diff) |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/Schema/Mysql.php | 7 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 7 |
2 files changed, 12 insertions, 2 deletions
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) { |