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(); + } +}