mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add missing migration
This commit is contained in:
parent
4cd3e2aecc
commit
450bfbc22b
@ -114,6 +114,7 @@ class ClientTransformer extends EntityTransformer
|
||||
'balance' => (float) $client->balance,
|
||||
'group_settings_id' => isset($client->group_settings_id) ? (string) $this->encodePrimaryKey($client->group_settings_id) : '',
|
||||
'paid_to_date' => (float) $client->paid_to_date,
|
||||
'payment_balance' => (float) $client->payment_balance,
|
||||
'credit_balance' => (float) $client->credit_balance,
|
||||
'last_login' => (int) $client->last_login,
|
||||
'size_id' => (string) $client->size_id,
|
||||
|
@ -0,0 +1,44 @@
|
||||
<?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()
|
||||
{
|
||||
|
||||
Schema::table('clients', function (Blueprint $table) {
|
||||
$table->decimal('payment_balance', 20, 6)->default(0);
|
||||
});
|
||||
|
||||
Company::query()
|
||||
->cursor()
|
||||
->each(function (Company $company) {
|
||||
|
||||
$settings = $company->settings;
|
||||
|
||||
if(!property_exists($settings, 'show_task_item_description'))
|
||||
$company->saveSettings((array)$company->settings, $company);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user