| @@ 55-66 (lines=12) @@ | ||
| 52 | $migrationName = $input->getArgument('migration'); |
|
| 53 | ||
| 54 | // ask user for confirmation to make changes |
|
| 55 | if ($input->isInteractive() && !$input->getOption('no-interaction')) { |
|
| 56 | $dialog = $this->getHelperSet()->get('dialog'); |
|
| 57 | if (!$dialog->askConfirmation( |
|
| 58 | $output, |
|
| 59 | '<question>Careful, the database will be modified. Do you want to continue Y/N ?</question>', |
|
| 60 | false |
|
| 61 | ) |
|
| 62 | ) { |
|
| 63 | $output->writeln('<error>Migration change cancelled!</error>'); |
|
| 64 | return 0; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| 68 | if ($input->getOption('delete')) { |
|
| 69 | $migration = $migrationsService->getMigration($migrationName); |
|
| @@ 112-125 (lines=14) @@ | ||
| 109 | ||
| 110 | $output->writeln(''); |
|
| 111 | // ask user for confirmation to make changes |
|
| 112 | if ($input->isInteractive() && !$input->getOption('no-interaction')) { |
|
| 113 | $dialog = $this->getHelperSet()->get('dialog'); |
|
| 114 | if (!$dialog->askConfirmation( |
|
| 115 | $output, |
|
| 116 | '<question>Careful, the database will be modified. Do you want to continue Y/N ?</question>', |
|
| 117 | false |
|
| 118 | ) |
|
| 119 | ) { |
|
| 120 | $output->writeln('<error>Migration execution cancelled!</error>'); |
|
| 121 | return 0; |
|
| 122 | } |
|
| 123 | } else { |
|
| 124 | $output->writeln("=============================================\n"); |
|
| 125 | } |
|
| 126 | ||
| 127 | foreach($toExecute as $name => $migrationDefinition) { |
|
| 128 | ||