| @@ 60-71 (lines=12) @@ | ||
| 57 | $migrationNameOrPath = $input->getArgument('migration'); |
|
| 58 | ||
| 59 | // ask user for confirmation to make changes |
|
| 60 | if ($input->isInteractive() && !$input->getOption('no-interaction')) { |
|
| 61 | $dialog = $this->getHelperSet()->get('dialog'); |
|
| 62 | if (!$dialog->askConfirmation( |
|
| 63 | $output, |
|
| 64 | '<question>Careful, the database will be modified. Do you want to continue Y/N ?</question>', |
|
| 65 | false |
|
| 66 | ) |
|
| 67 | ) { |
|
| 68 | $output->writeln('<error>Migration change cancelled!</error>'); |
|
| 69 | return 0; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| 73 | if ($input->getOption('add')) { |
|
| 74 | // will throw if a file is passed and it is not found, but not if an empty dir is passed |
|
| @@ 123-136 (lines=14) @@ | ||
| 120 | ||
| 121 | $output->writeln(''); |
|
| 122 | // ask user for confirmation to make changes |
|
| 123 | if ($input->isInteractive() && !$input->getOption('no-interaction')) { |
|
| 124 | $dialog = $this->getHelperSet()->get('dialog'); |
|
| 125 | if (!$dialog->askConfirmation( |
|
| 126 | $output, |
|
| 127 | '<question>Careful, the database will be modified. Do you want to continue Y/N ?</question>', |
|
| 128 | false |
|
| 129 | ) |
|
| 130 | ) { |
|
| 131 | $output->writeln('<error>Migration execution cancelled!</error>'); |
|
| 132 | return 0; |
|
| 133 | } |
|
| 134 | } else { |
|
| 135 | $output->writeln("=============================================\n"); |
|
| 136 | } |
|
| 137 | ||
| 138 | foreach($toExecute as $name => $migrationDefinition) { |
|
| 139 | ||