@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\StandaloneInstallation;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class PrepareStandaloneRuntime extends Command
|
||||
{
|
||||
protected $signature = 'compras:runtime:prepare
|
||||
{--expected-database= : Exact own database name}
|
||||
{--expected-role= : Exact non-elevated database role}
|
||||
{--operator= : Named deployment operator}
|
||||
{--reason= : Recorded installation or recovery reason}
|
||||
{--apply : Apply the explicitly selected installation}
|
||||
{--rebind : Preserve restored schema and register a new installation binding}';
|
||||
|
||||
protected $description = 'Preparar explicitamente a composição independente; pré-visualizar por defeito';
|
||||
|
||||
public function handle(StandaloneInstallation $installation): int
|
||||
{
|
||||
$result = $installation->prepare((string) $this->option('expected-database'), (string) $this->option('expected-role'),
|
||||
(string) $this->option('operator'), (string) $this->option('reason'), $this->option('apply') === true, $this->option('rebind') === true);
|
||||
$this->line(json_encode($result, JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR));
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user