From 03f91bd721b09f166d8a2fb09fc83e4a243ba8c1 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Sat, 21 Dec 2024 19:00:07 -0300 Subject: [PATCH] Command --- app/src/Command/GenerateMigrations.php | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 app/src/Command/GenerateMigrations.php diff --git a/app/src/Command/GenerateMigrations.php b/app/src/Command/GenerateMigrations.php new file mode 100644 index 0000000..13e2b04 --- /dev/null +++ b/app/src/Command/GenerateMigrations.php @@ -0,0 +1,34 @@ +addOption('dry-run', 'd', Console\Input\InputOption::VALUE_OPTIONAL, default: false); + } + + public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int + { + $io = new Console\Style\SymfonyStyle($input, $output); + $io->title('Generate Migrations'); + + $dryRun = $input->getOption('dry-run'); + + $this->migrationGenerator->generate($io, $dryRun); + + return Console\Command\Command::SUCCESS; + } +} \ No newline at end of file