perf: 优化国际化语言
This commit is contained in:
35
database/migrations/2024_11_05_151611_add_users_lang.php
Normal file
35
database/migrations/2024_11_05_151611_add_users_lang.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUsersLang extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('users', 'lang')) {
|
||||
$table->string('lang', 20)->nullable()->default('')->after('bot')->comment('语言首选项');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn("lang");
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user