mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Update shopify
This commit is contained in:
parent
1288ddc195
commit
7c6f11f7e2
@ -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()
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user