优化屏蔽,可以保存状态

This commit is contained in:
2026-04-14 22:48:29 +08:00
parent 7255d50966
commit 1a39ddd725
8 changed files with 279 additions and 5 deletions
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* 为用户表增加聊天室偏好配置字段。
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->json('chat_preferences')->nullable()->after('custom_leave_effect')->comment('聊天室屏蔽与禁音偏好配置');
});
}
/**
* 回滚用户表中的聊天室偏好配置字段。
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('chat_preferences');
});
}
};