diff --git a/CHANGELOG.md b/CHANGELOG.md index a758b8fb..575247d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASED] +### Fixed + +- Increased the maximum length of the language column to support longer locale codes + ## [1.21.24] - 2025-10-10 ### Fixed diff --git a/inc/labeltranslation.class.php b/inc/labeltranslation.class.php index a8b844df..a26c635a 100644 --- a/inc/labeltranslation.class.php +++ b/inc/labeltranslation.class.php @@ -61,7 +61,7 @@ public static function installBaseData(Migration $migration, $version) `id` INT {$default_key_sign} NOT NULL auto_increment, `itemtype` VARCHAR(30) NOT NULL, `items_id` INT {$default_key_sign} NOT NULL, - `language` VARCHAR(5) NOT NULL, + `language` VARCHAR(10) NOT NULL, `label` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `itemtype` (`itemtype`), @@ -86,6 +86,10 @@ public static function installBaseData(Migration $migration, $version) $migration->addKey($table, 'items_id'); } + if ($DB->fieldExists($table, 'language')) { + $migration->changeField($table, 'language', 'language', "VARCHAR(10) NOT NULL"); + } + return true; }