|
|
@@ -0,0 +1,27 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+
|
|
|
+// Telegram 用户 ID 超过 int(11) 上限(如 6726782956),机器人下注写入 lhc_order / lhc_order_item 时溢出。
|
|
|
+return new class extends Migration
|
|
|
+{
|
|
|
+ public function up(): void
|
|
|
+ {
|
|
|
+ foreach (['lhc_order', 'lhc_order_item'] as $table) {
|
|
|
+ Schema::table($table, function (Blueprint $t) {
|
|
|
+ $t->unsignedBigInteger('member_id')->nullable()->comment('用户id')->change();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public function down(): void
|
|
|
+ {
|
|
|
+ foreach (['lhc_order', 'lhc_order_item'] as $table) {
|
|
|
+ Schema::table($table, function (Blueprint $t) {
|
|
|
+ $t->integer('member_id')->nullable()->comment('用户id')->change();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|