mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-07 16:24:35 -04:00
Improve update key command
This commit is contained in:
parent
2ca8f57b24
commit
9cc47b5e20
@ -20,7 +20,7 @@ class UpdateKey extends Command
|
|||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $name = 'ninja:update-key';
|
protected $name = 'ninja:update-key {--database=}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
@ -31,6 +31,10 @@ class UpdateKey extends Command
|
|||||||
{
|
{
|
||||||
$this->info(date('r') . ' Running UpdateKey...');
|
$this->info(date('r') . ' Running UpdateKey...');
|
||||||
|
|
||||||
|
if ($database = $this->option('database')) {
|
||||||
|
config(['database.default' => $database]);
|
||||||
|
}
|
||||||
|
|
||||||
if (! env('APP_KEY') || ! env('APP_CIPHER')) {
|
if (! env('APP_KEY') || ! env('APP_CIPHER')) {
|
||||||
$this->info(date('r') . ' Error: app key and cipher are not set');
|
$this->info(date('r') . ' Error: app key and cipher are not set');
|
||||||
exit;
|
exit;
|
||||||
@ -135,6 +139,7 @@ class UpdateKey extends Command
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
['legacy', null, InputOption::VALUE_OPTIONAL, 'Legacy', null],
|
['legacy', null, InputOption::VALUE_OPTIONAL, 'Legacy', null],
|
||||||
|
['database', null, InputOption::VALUE_OPTIONAL, 'Database', null],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user