mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Final commands.
This commit is contained in:
@@ -51,10 +51,40 @@ echo "Discover packages..."
|
|||||||
php artisan package:discover
|
php artisan package:discover
|
||||||
|
|
||||||
echo "Run various artisan commands..."
|
echo "Run various artisan commands..."
|
||||||
|
php artisan cache:clear
|
||||||
php artisan migrate --seed
|
php artisan migrate --seed
|
||||||
php artisan firefly:decrypt-all
|
php artisan firefly:decrypt-all
|
||||||
php artisan firefly:upgrade-database
|
|
||||||
php artisan firefly:verify
|
# upgrade database commands:
|
||||||
|
php artisan firefly-iii:transaction-identifiers
|
||||||
|
php artisan firefly-iii:account-currencies
|
||||||
|
php artisan firefly-iii:journal-currencies
|
||||||
|
php artisan firefly-iii:migrate-notes
|
||||||
|
php artisan firefly-iii:migrate-attachments
|
||||||
|
php artisan firefly-iii:bills-to-rules
|
||||||
|
php artisan firefly-iii:bl-currency
|
||||||
|
php artisan firefly-iii:cc-liabilities
|
||||||
|
php artisan firefly-iii:migrate-to-groups
|
||||||
|
php artisan firefly-iii:back-to-journals
|
||||||
|
|
||||||
|
#verify database commands
|
||||||
|
php artisan firefly-iii:fix-piggies
|
||||||
|
php artisan firefly-iii:create-link-types
|
||||||
|
php artisan firefly-iii:create-access-tokens
|
||||||
|
php artisan firefly-iii:remove-bills
|
||||||
|
php artisan firefly-iii:enable-currencies
|
||||||
|
php artisan firefly-iii:fix-transfer-budgets
|
||||||
|
php artisan firefly-iii:fix-uneven-amount
|
||||||
|
php artisan firefly-iii:delete-zero-amount
|
||||||
|
php artisan firefly-iii:delete-orphaned-transactions
|
||||||
|
php artisan firefly-iii:delete-empty-journals
|
||||||
|
php artisan firefly-iii:delete-empty-groups
|
||||||
|
php artisan firefly-iii:fix-account-types
|
||||||
|
|
||||||
|
# report commands
|
||||||
|
php artisan firefly-iii:report-empty-objects
|
||||||
|
php artisan firefly-iii:report-sum
|
||||||
|
|
||||||
php artisan passport:install
|
php artisan passport:install
|
||||||
php artisan cache:clear
|
php artisan cache:clear
|
||||||
|
|
||||||
|
@@ -156,7 +156,9 @@ class FixAccountTypes extends Command
|
|||||||
|
|
||||||
|
|
||||||
$this->expected = config('firefly.source_dests');
|
$this->expected = config('firefly.source_dests');
|
||||||
$journals = TransactionJournal::with(['TransactionType', 'transactions', 'transactions.account', 'transactions.account.accounttype'])->get();
|
$journals = TransactionJournal
|
||||||
|
|
||||||
|
::with(['TransactionType', 'transactions', 'transactions.account', 'transactions.account.accounttype'])->get();
|
||||||
foreach ($journals as $journal) {
|
foreach ($journals as $journal) {
|
||||||
$this->inspectJournal($journal);
|
$this->inspectJournal($journal);
|
||||||
}
|
}
|
||||||
|
@@ -141,7 +141,7 @@ class BackToJournals extends Command
|
|||||||
|
|
||||||
// empty tables
|
// empty tables
|
||||||
DB::table('budget_transaction')->delete();
|
DB::table('budget_transaction')->delete();
|
||||||
DB::table('categories_transaction')->delete();
|
DB::table('category_transaction')->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -146,7 +146,14 @@ class MigrateToGroups extends Command
|
|||||||
*/
|
*/
|
||||||
private function giveGroup(array $array): void
|
private function giveGroup(array $array): void
|
||||||
{
|
{
|
||||||
$groupId = DB::table('transaction_groups')->insertGetId(['title' => null, 'user_id' => $array['user_id']]);
|
$groupId = DB::table('transaction_groups')->insertGetId(
|
||||||
|
[
|
||||||
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
|
'updated_at' => date('Y-m-d H:i:s'),
|
||||||
|
'title' => null,
|
||||||
|
'user_id' => $array['user_id'],
|
||||||
|
]
|
||||||
|
);
|
||||||
DB::table('transaction_journals')->where('id', $array['id'])->update(['transaction_group_id' => $groupId]);
|
DB::table('transaction_journals')->where('id', $array['id'])->update(['transaction_group_id' => $groupId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,9 +324,16 @@ class MigrateToGroups extends Command
|
|||||||
// delete the old transaction journal.
|
// delete the old transaction journal.
|
||||||
$this->service->destroy($journal);
|
$this->service->destroy($journal);
|
||||||
|
|
||||||
|
// first group ID
|
||||||
|
$first = $result->first() ? $result->first()->transaction_group_id : 0;
|
||||||
|
|
||||||
// report on result:
|
// report on result:
|
||||||
Log::debug(sprintf('Migrated journal #%d into these journals: #%s', $journal->id, implode(', #', $result->pluck('id')->toArray())));
|
Log::debug(
|
||||||
$this->line(sprintf('Migrated journal #%d into these journals: #%s', $journal->id, implode(', #', $result->pluck('id')->toArray())));
|
sprintf('Migrated journal #%d into group #%d with these journals: #%s', $journal->id, $first, implode(', #', $result->pluck('id')->toArray()))
|
||||||
|
);
|
||||||
|
$this->line(
|
||||||
|
sprintf('Migrated journal #%d into group #%d with these journals: #%s', $journal->id, $first, implode(', #', $result->pluck('id')->toArray()))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user