setName("migrate:reset") ->setDescription("Reset the whole database to an empty state") ->addOption('sprinkle', NULL, InputOption::VALUE_REQUIRED, 'The sprinkle to rollback', "") ->addOption('pretend', 'p', InputOption::VALUE_NONE, 'Run migrations in "dry run" mode'); } /** * {@inheritDoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $this->io->title("Migration reset"); $sprinkle = $input->getOption('sprinkle'); $pretend = $input->getOption('pretend'); $migrator = new Migrator($this->io, $this->ci); $migrator->runDown(-1, $sprinkle, $pretend); } }