diff --git a/app/Console/Commands/UpgradeDatabase.php b/app/Console/Commands/UpgradeDatabase.php index 2123a65a24..5c4633c340 100644 --- a/app/Console/Commands/UpgradeDatabase.php +++ b/app/Console/Commands/UpgradeDatabase.php @@ -79,7 +79,6 @@ class UpgradeDatabase extends Command public function handle() { $this->setTransactionIdentifier(); - $this->migrateRepetitions(); $this->updateAccountCurrencies(); $this->createNewTypes(); $this->line('Updating currency information..'); @@ -92,28 +91,6 @@ class UpgradeDatabase extends Command return; } - /** - * Migrate budget repetitions to new format where the end date is in the budget limit as well, - * making the limit_repetition table obsolete. - */ - public function migrateRepetitions(): void - { - $set = BudgetLimit::whereNull('end_date')->get(); - /** @var BudgetLimit $budgetLimit */ - foreach ($set as $budgetLimit) { - /** @var LimitRepetition $repetition */ - $repetition = $budgetLimit->limitrepetitions()->first(); - if (null !== $repetition) { - $budgetLimit->end_date = $repetition->enddate; - $budgetLimit->save(); - $this->line(sprintf('Updated budget limit #%d', $budgetLimit->id)); - $repetition->delete(); - } - } - - return; - } - /** * This method gives all transactions which are part of a split journal (so more than 2) a sort of "order" so they are easier * to easier to match to their counterpart. When a journal is split, it has two or three transactions: -3, -4 and -5 for example.