diff --git a/database/migrations/2026_03_01_135706_add_type_reason_to_username_blacklist.php b/database/migrations/2026_03_01_135706_add_type_reason_to_username_blacklist.php index e88a6b7..3b3b32f 100644 --- a/database/migrations/2026_03_01_135706_add_type_reason_to_username_blacklist.php +++ b/database/migrations/2026_03_01_135706_add_type_reason_to_username_blacklist.php @@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { /** - * 执行迁移:新增 type 和 reason 列。 + * 执行迁移:新增 type 和 reason 列,同时将 reserved_until 改为可空。 */ public function up(): void { @@ -25,6 +25,9 @@ return new class extends Migration ->after('username') ->comment('temp=改名临时保留 | permanent=管理员永久禁用词'); + // permanent 记录无到期时间,需要允许 NULL + $table->timestamp('reserved_until')->nullable()->change(); + // 禁用原因(permanent 时填写) $table->string('reason', 100) ->nullable()