1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Fixes for migration

This commit is contained in:
David Bomba 2021-01-23 20:18:29 +11:00
parent b245147844
commit 248f95b295
2 changed files with 9 additions and 4 deletions

View File

@ -16,9 +16,14 @@ class RemoveCyberSourceGateway extends Migration
{
/* No longer supported for V2 Omnipay */
$cyber = Gateway::where('provider', 'Cybersource')->first();
$cyber->payment_library_id = 2;
$cyber->save();
if(Gatway::count() > 0)
{
$cyber = Gateway::where('provider', 'Cybersource')->first();
$cyber->payment_library_id = 2;
$cyber->save();
}
}
/**

View File

@ -57,7 +57,7 @@ class PaymentLibrariesSeeder extends Seeder
['name' => 'Cardgate', 'provider' => 'Cardgate'],
['name' => 'Checkout.com', 'provider' => 'CheckoutCom'],
['name' => 'Creditcall', 'provider' => 'Creditcall'],
['name' => 'Cybersource', 'provider' => 'Cybersource'],
['name' => 'Cybersource', 'provider' => 'Cybersource', 'payment_library_id' => 2],
['name' => 'ecoPayz', 'provider' => 'Ecopayz'],
['name' => 'Fasapay', 'provider' => 'Fasapay'],
['name' => 'Komoju', 'provider' => 'Komoju'],