mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 00:27:30 +00:00
Finalise account tests
This commit is contained in:
@@ -61,6 +61,7 @@ class RenameAccountMeta extends Command
|
||||
$array = [
|
||||
'accountRole' => 'account_role',
|
||||
'ccType' => 'cc_type',
|
||||
'accountNumber' => 'account_number',
|
||||
'ccMonthlyPaymentDate' => 'cc_monthly_payment_date',
|
||||
];
|
||||
$count = 0;
|
||||
@@ -71,6 +72,9 @@ class RenameAccountMeta extends Command
|
||||
*/
|
||||
foreach ($array as $old => $new) {
|
||||
$count += AccountMeta::where('name', $old)->update(['name' => $new]);
|
||||
|
||||
// delete empty entries while we're at it.
|
||||
AccountMeta::where('name', $new)->where('data','""')->delete();
|
||||
}
|
||||
|
||||
$this->markAsExecuted();
|
||||
|
Reference in New Issue
Block a user