diff --git a/database/migrations/2026_02_27_003842_seed_leaderboard_limit_sysparam.php b/database/migrations/2026_02_27_003842_seed_leaderboard_limit_sysparam.php new file mode 100644 index 0000000..4473105 --- /dev/null +++ b/database/migrations/2026_02_27_003842_seed_leaderboard_limit_sysparam.php @@ -0,0 +1,42 @@ +where('alias', 'leaderboard_limit')->exists(); + + if (! $exists) { + DB::table('sysparam')->insert([ + 'alias' => 'leaderboard_limit', + 'body' => '20', + 'guidetxt' => '🏆 排行榜每榜显示人数', + ]); + } + } + + /** + * 回滚:删除配置记录 + */ + public function down(): void + { + DB::table('sysparam')->where('alias', 'leaderboard_limit')->delete(); + } +};