mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +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();
|
||||
|
@@ -55,6 +55,7 @@ class UpgradeDatabase extends Command
|
||||
$commands = [
|
||||
// there are 12 upgrade commands.
|
||||
'firefly-iii:transaction-identifiers',
|
||||
'firefly-iii:migrate-to-groups',
|
||||
'firefly-iii:account-currencies',
|
||||
'firefly-iii:transfer-currencies',
|
||||
'firefly-iii:other-currencies',
|
||||
@@ -63,7 +64,6 @@ class UpgradeDatabase extends Command
|
||||
'firefly-iii:bills-to-rules',
|
||||
'firefly-iii:bl-currency',
|
||||
'firefly-iii:cc-liabilities',
|
||||
'firefly-iii:migrate-to-groups',
|
||||
'firefly-iii:back-to-journals',
|
||||
'firefly-iii:rename-account-meta'
|
||||
];
|
||||
|
Reference in New Issue
Block a user