From 57d6ca50e6308a84f9ebc206d92506aff2e8ffae Mon Sep 17 00:00:00 2001 From: harshjagad20 Date: Wed, 8 Dec 2021 16:30:43 +0530 Subject: [PATCH] make user_id nullable in payments --- .../2021_06_28_120231_add_customer_id_to_payments_table.php | 2 +- 1 file changed, 1 insertion(+), 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 38d4a6ab..83324bfd 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 @@ -14,7 +14,7 @@ class AddCustomerIdToPaymentsTable extends Migration public function up() { Schema::table('payments', function (Blueprint $table) { - $table->unsignedBigInteger('user_id')->nullable(); + $table->unsignedBigInteger('user_id')->nullable()->change(); $table->unsignedBigInteger('customer_id')->nullable(); $table->foreign('customer_id')->references('id')->on('customers'); });