1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Migration for merchantAccountId

This commit is contained in:
Benjamin Beganović 2021-09-05 12:12:59 +02:00
parent db462e56d8
commit 535e0b93aa

View File

@ -0,0 +1,25 @@
<?php
use App\Models\Gateway;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateBraintreeGateway extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if ($gateway = Gateway::find(50)) {
$fields = json_decode($gateway->fields);
$fields->merchantAccountId = '';
$gateway->fields = json_encode($fields);
$gateway->save();
}
}
}