fix(chat): 修复五子棋配置 Seeder 的字段报错,撤销错误的表结构修改
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('game_configs', function (Blueprint $table) {
|
||||
$table->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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user