From b7f2dae847d4dfa90740e99af1df4fb7ac9532bb Mon Sep 17 00:00:00 2001 From: lkddi Date: Thu, 12 Mar 2026 08:36:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(chat):=20=E6=B7=BB=E5=8A=A0=20game=5Fconfig?= =?UTF-8?q?s=20=E8=A1=A8=E7=BC=BA=E5=A4=B1=E7=9A=84=20type=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=9A=84=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._083619_add_type_to_game_configs_table.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 database/migrations/2026_03_12_083619_add_type_to_game_configs_table.php diff --git a/database/migrations/2026_03_12_083619_add_type_to_game_configs_table.php b/database/migrations/2026_03_12_083619_add_type_to_game_configs_table.php new file mode 100644 index 0000000..05fe2df --- /dev/null +++ b/database/migrations/2026_03_12_083619_add_type_to_game_configs_table.php @@ -0,0 +1,31 @@ +string('type', 20)->default('general')->after('id')->comment('配置分类:gomoku/general等'); + // 为了保证加速查询 + $table->index(['type', 'key']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('game_configs', function (Blueprint $table) { + $table->dropIndex(['type', 'key']); + $table->dropColumn('type'); + }); + } +};