make user_id nullable in payments

This commit is contained in:
harshjagad20
2021-12-08 16:30:43 +05:30
parent 5ed62ac1dd
commit 57d6ca50e6

View File

@ -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');
});