Skip to content

Commit

Permalink
[make:migration] add ability to specify a configuration file (#516)
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Rushlow <jr@rushlow.dev>
  • Loading branch information
LeJeanbono and jrushlow authored Mar 4, 2024
1 parent 7706a2f commit a5a5b01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Maker/MakeMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function configureCommand(Command $command, InputConfiguration $inputConf
->addOption('db', null, InputOption::VALUE_REQUIRED, 'The database connection name')
->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager name')
->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection name')
->addOption('configuration', null, InputOption::VALUE_OPTIONAL, 'The path of doctrine configuration file')
;
}

Expand All @@ -89,6 +90,10 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
if ($input->hasOption('shard') && null !== $input->getOption('shard')) {
$options[] = '--shard='.$input->getOption('shard');
}

if (null !== $input->getOption('configuration')) {
$options[] = '--configuration='.$input->getOption('configuration');
}
// end 2.x support

if ($input->getOption('formatted')) {
Expand Down

0 comments on commit a5a5b01

Please sign in to comment.