Finalise account tests

This commit is contained in:
James Cole
2019-06-23 05:53:01 +02:00
parent 311659ba0d
commit 9f50c5db3d
25 changed files with 470 additions and 841 deletions

View File

@@ -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();

View File

@@ -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'
];