Add translation system (#85)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
// This migration adds a "language" column to the user table and sets all values to english.
|
||||
|
||||
/** @noinspection PhpUndefinedVariableInspection */
|
||||
$columnQuery = $db->query("SELECT * FROM pragma_table_info('user') where name='language'");
|
||||
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
|
||||
|
||||
if ($columnRequired) {
|
||||
$db->exec('ALTER TABLE user ADD COLUMN language TEXT DEFAULT "en"');
|
||||
$db->exec('UPDATE user SET language = "en"');
|
||||
}
|
||||
Reference in New Issue
Block a user