Use low level env init on migrate:run + migrate:to

This commit is contained in:
slawkens
2025-10-24 21:10:55 +02:00
parent 598cec2fe4
commit 13ea68cc0c
4 changed files with 43 additions and 29 deletions

View File

@@ -10,6 +10,8 @@ use Symfony\Component\Console\Style\SymfonyStyle;
class MigrateRunCommand extends Command
{
use Env;
protected function configure(): void
{
$this->setName('migrate:run')
@@ -23,12 +25,12 @@ class MigrateRunCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): int
{
require SYSTEM . 'init.php';
$io = new SymfonyStyle($input, $output);
$ids = $input->getArgument('id');
$this->init();
// pre-check
// in case one of the migrations doesn't exist - we won't execute any of them
foreach ($ids as $id) {