Fix for migration
This commit is contained in:
parent
4f04e56c7e
commit
5f340cb7cc
1 changed files with 19 additions and 17 deletions
|
|
@ -29,26 +29,28 @@ class AddInvoiceSignature extends Migration
|
|||
$table->string('utm_content')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->unsignedInteger('account_gateway_token_id')->nullable()->change();
|
||||
$table->dropForeign('payment_methods_account_gateway_token_id_foreign');
|
||||
});
|
||||
if (Utils::isNinja()) {
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->unsignedInteger('account_gateway_token_id')->nullable()->change();
|
||||
$table->dropForeign('payment_methods_account_gateway_token_id_foreign');
|
||||
});
|
||||
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->foreign('account_gateway_token_id')->references('id')->on('account_gateway_tokens')->onDelete('cascade');
|
||||
});
|
||||
Schema::table('payment_methods', function($table)
|
||||
{
|
||||
$table->foreign('account_gateway_token_id')->references('id')->on('account_gateway_tokens')->onDelete('cascade');
|
||||
});
|
||||
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->dropForeign('payments_payment_method_id_foreign');
|
||||
});
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->dropForeign('payments_payment_method_id_foreign');
|
||||
});
|
||||
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->foreign('payment_method_id')->references('id')->on('payment_methods')->onDelete('cascade');;
|
||||
});
|
||||
Schema::table('payments', function($table)
|
||||
{
|
||||
$table->foreign('payment_method_id')->references('id')->on('payment_methods')->onDelete('cascade');;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue