Sync between command line and FF

This commit is contained in:
James Cole
2019-08-05 17:07:19 +02:00
parent a077d58e9c
commit e37100ae97
2 changed files with 15 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ SEND_REPORT_JOURNALS=true
MAPBOX_API_KEY=
# Firefly III currently supports two provider for live Currency Exchange Rates:
# "fixer" is the default (for backward compatibility), and "ratesapi" is the new one.
# "fixer", and "ratesapi".
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
# built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
CER_PROVIDER=ratesapi

View File

@@ -52,6 +52,9 @@ class UpgradeDatabase extends Command
*/
public function handle(): int
{
$this->callInitialCommands();
$commands = [
// there are 12 upgrade commands.
'firefly-iii:transaction-identifiers',
@@ -100,6 +103,17 @@ class UpgradeDatabase extends Command
echo $result;
}
// set new DB version.
// index will set FF3 version.
app('fireflyconfig')->set('ff3_version', (string)config('firefly.version'));
return 0;
}
private function callInitialCommands(): void
{
Artisan::call('migrate', ['--seed' => true]);
Artisan::call('firefly-iii:decrypt-all');
Artisan::call('generate-keys');
}
}