commit melhorias sgf
This commit is contained in:
@@ -38,6 +38,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
Event::listen(CommandStarting::class, function (CommandStarting $event): void {
|
||||
if (in_array($event->command, ['migrate:fresh', 'migrate:refresh', 'migrate:reset', 'migrate:rollback', 'db:wipe'], true)) {
|
||||
if($this->app->environment('budget-testing'))throw new \RuntimeException('SGF_COMPOSITION_DESTRUCTIVE_COMMAND_REFUSED');
|
||||
$connection = $event->input->hasOption('database') ? $event->input->getOption('database') : null;
|
||||
TestingDatabaseGuard::assertSafe($connection);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user