From 096516ba3365f0a696ea8d112afe3ab324f592b1 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Fri, 10 Apr 2026 16:10:01 +0800 Subject: [PATCH] =?UTF-8?q?mysql=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...402120000_game_user_tier_bigwin_ticket.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 database/migrations/20260402120000_game_user_tier_bigwin_ticket.php diff --git a/database/migrations/20260402120000_game_user_tier_bigwin_ticket.php b/database/migrations/20260402120000_game_user_tier_bigwin_ticket.php new file mode 100644 index 0000000..fd2a27a --- /dev/null +++ b/database/migrations/20260402120000_game_user_tier_bigwin_ticket.php @@ -0,0 +1,39 @@ +hasTable('game_user')) { + return; + } + $table = $this->table('game_user'); + if (!$table->hasColumn('tier_weight')) { + $table->addColumn('tier_weight', 'text', [ + 'null' => true, + 'default' => null, + 'comment' => '档位权重 JSON,如 [{"T1":"5"},{"T2":"20"}]', + ]); + } + if (!$table->hasColumn('bigwin_weight')) { + $table->addColumn('bigwin_weight', 'text', [ + 'null' => true, + 'default' => null, + 'comment' => '中大奖权重 JSON', + ]); + } + if (!$table->hasColumn('ticket_count')) { + $table->addColumn('ticket_count', 'text', [ + 'null' => true, + 'default' => null, + 'comment' => '抽奖券 JSON,如 [{"ante":1,"count":1}]', + ]); + } + $table->update(); + } +}