1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Update shopify

This commit is contained in:
David Bomba 2023-05-03 12:44:29 +10:00
parent 1288ddc195
commit 7c6f11f7e2

View File

@ -0,0 +1,48 @@
<?php
use App\Models\Company;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Company::query()->cursor()->each(function ($company) {
$settings = $company->settings;
if(!property_exists($settings, 'enable_e_invoice')) {
$company->saveSettings((array)$company->settings, $company);
}
});
Schema::table('users', function (Blueprint $table) {
$table->unsignedInteger('shopify_user_id')->index()->nullable();
});
//902541635
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};