移除补签卡默认值更新迁移
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 文件功能:更新补签卡默认价格和购买说明。
|
||||
*
|
||||
* 确保已经运行过旧迁移的环境,也能同步补签卡 10000 金币与本月补签限制说明。
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* 方法功能:把补签卡默认价格和说明更新为当前业务规则。
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::table('shop_items')
|
||||
->where('slug', 'sign_repair_card')
|
||||
->update([
|
||||
'price' => 10000,
|
||||
'description' => '用于补签本月漏掉的未签到日期,每张可补签 1 天;不能补签上月或更早日期。',
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法功能:回滚补签卡默认价格和旧说明,方便本地调试回退。
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
DB::table('shop_items')
|
||||
->where('slug', 'sign_repair_card')
|
||||
->update([
|
||||
'price' => 1200,
|
||||
'description' => '用于补签漏掉的历史日期,每张可补签 1 天。',
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user