diff --git a/database/migrations/2021_06_28_120231_add_customer_id_to_payments_table.php b/database/migrations/2021_06_28_120231_add_customer_id_to_payments_table.php index 83324bfd..31e2240b 100644 --- a/database/migrations/2021_06_28_120231_add_customer_id_to_payments_table.php +++ b/database/migrations/2021_06_28_120231_add_customer_id_to_payments_table.php @@ -13,11 +13,13 @@ class AddCustomerIdToPaymentsTable extends Migration */ public function up() { + Schema::disableForeignKeyConstraints(); Schema::table('payments', function (Blueprint $table) { - $table->unsignedBigInteger('user_id')->nullable()->change(); + $table->unsignedInteger('user_id')->nullable()->change(); $table->unsignedBigInteger('customer_id')->nullable(); $table->foreign('customer_id')->references('id')->on('customers'); }); + Schema::enableForeignKeyConstraints(); } /**