Skip to content

Commit

Permalink
xx
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas committed Sep 19, 2021
1 parent f5a2714 commit e2f3c51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory();
$migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input);

$databaseName = $this->getDependencyFactory()->getConnection()->getDatabase();
$databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase();
$question = sprintf(
'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?',
$databaseName === '' || $databaseName === null ? '<unnamed>' : $databaseName
$databaseName === '' ? '<unnamed>' : $databaseName
);
if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) {
$this->io->error('Migration cancelled!');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory();
$migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input);

$databaseName = $this->getDependencyFactory()->getConnection()->getDatabase();
$databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase();
$question = sprintf(
'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?',
$databaseName === '' || $databaseName === null ? '<unnamed>' : $databaseName
$databaseName === '' ? '<unnamed>' : $databaseName
);
if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) {
$this->io->error('Migration cancelled!');
Expand Down

0 comments on commit e2f3c51

Please sign in to comment.