From 508695efb253d7bc0caea1fa017ed5608d774596 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 8 Jul 2019 01:47:01 +0200 Subject: Replaced gettext translation with package This allows to check if no translation is available --- .../2019_06_12_000000_fix_user_languages.php | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 db/migrations/2019_06_12_000000_fix_user_languages.php (limited to 'db') diff --git a/db/migrations/2019_06_12_000000_fix_user_languages.php b/db/migrations/2019_06_12_000000_fix_user_languages.php new file mode 100644 index 00000000..c7d1474c --- /dev/null +++ b/db/migrations/2019_06_12_000000_fix_user_languages.php @@ -0,0 +1,34 @@ +schema->getConnection(); + $connection + ->table('users_settings') + ->update([ + 'language' => $connection->raw('REPLACE(language, ".UTF-8", "")') + ]); + } + + /** + * Reverse the migration + */ + public function down() + { + $connection = $this->schema->getConnection(); + $connection + ->table('users_settings') + ->update([ + 'language' => $connection->raw('CONCAT(language, ".UTF-8")') + ]); + } +} -- cgit v1.2.3-54-g00ecf