solve migration issue

This commit is contained in:
jayvirsinh_gohil
2021-12-08 17:14:02 +05:30
parent 68db11becf
commit ca87133c39

View File

@ -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();
}
/**