1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Improve update key command

This commit is contained in:
Hillel Coren 2017-12-14 17:43:11 +02:00
parent 2ca8f57b24
commit 9cc47b5e20

View File

@ -20,7 +20,7 @@ class UpdateKey extends Command
/**
* @var string
*/
protected $name = 'ninja:update-key';
protected $name = 'ninja:update-key {--database=}';
/**
* @var string
@ -31,6 +31,10 @@ class UpdateKey extends Command
{
$this->info(date('r') . ' Running UpdateKey...');
if ($database = $this->option('database')) {
config(['database.default' => $database]);
}
if (! env('APP_KEY') || ! env('APP_CIPHER')) {
$this->info(date('r') . ' Error: app key and cipher are not set');
exit;
@ -135,6 +139,7 @@ class UpdateKey extends Command
{
return [
['legacy', null, InputOption::VALUE_OPTIONAL, 'Legacy', null],
['database', null, InputOption::VALUE_OPTIONAL, 'Database', null],
];
}
}