mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Merge branch 'migration-issue' into 'master'
solve migration issue See merge request mohit.panjvani/crater-web!1327
This commit is contained in:
@ -13,11 +13,13 @@ class AddCustomerIdToPaymentsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
Schema::disableForeignKeyConstraints();
|
||||||
Schema::table('payments', function (Blueprint $table) {
|
Schema::table('payments', function (Blueprint $table) {
|
||||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
$table->unsignedInteger('user_id')->nullable()->change();
|
||||||
$table->unsignedBigInteger('customer_id')->nullable();
|
$table->unsignedBigInteger('customer_id')->nullable();
|
||||||
$table->foreign('customer_id')->references('id')->on('customers');
|
$table->foreign('customer_id')->references('id')->on('customers');
|
||||||
});
|
});
|
||||||
|
Schema::enableForeignKeyConstraints();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user