mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Remove upgrade method.
This commit is contained in:
parent
c2a129ddb0
commit
aca5d8b6e9
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user