mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-26 14:04:17 +01:00
31 lines
723 B
PHP
31 lines
723 B
PHP
<?php
|
|
|
|
namespace MyAAC\Commands;
|
|
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
|
|
class MigrateCommand extends Command
|
|
{
|
|
use Env;
|
|
|
|
protected function configure(): void
|
|
{
|
|
$this->setName('migrate')
|
|
->setDescription('This command updates the AAC to latest migration');
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
|
{
|
|
$this->init();
|
|
|
|
$io = new SymfonyStyle($input, $output);
|
|
require SYSTEM . 'migrate.php';
|
|
|
|
$io->success('Migrated to latest version (' . DATABASE_VERSION . ')');
|
|
return Command::SUCCESS;
|
|
}
|
|
}
|