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'); + }); + } +};