From ca87133c39904ce12208931318d9d7335ad2b96c Mon Sep 17 00:00:00 2001 From: jayvirsinh_gohil Date: Wed, 8 Dec 2021 17:14:02 +0530 Subject: [PATCH] solve migration issue --- .../2021_06_28_120231_add_customer_id_to_payments_table.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } /**