Skip to content

Commit

Permalink
feat: add interactive migration selection for rollback command
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1Pro committed Jan 18, 2025
1 parent ebfd85d commit f23faef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function handle()

// if step or batch is not set, we need to rollback all migrations
$migrations = [];
if (($this->option('step') == null && $this->option('batch') == null)) {
if (($this->option('select'))) {
$migrations = $this->getMigrationsForRollback();
}

Expand Down Expand Up @@ -97,6 +97,7 @@ protected function getOptions()
['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'],
['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted'],
['batch', null, InputOption::VALUE_REQUIRED, 'The batch of migrations (identified by their batch number) to be reverted'],
['select', null, InputOption::VALUE_NONE, 'Select the migrations to rollback'],
];
}

Expand Down

0 comments on commit f23faef

Please sign in to comment.