forked from fa/breadcrumb-the-shire
- remove legacy bin/module-*.php and bin/doctor.php entry scripts - move module/doctor execution into class-based runners under lib/Console - add stable JSON output for doctor and module:sync - introduce bin/dev for init/up/down/logs/console/qa workflow - update DI wiring, phpstan scan config, tests, and docs to new CLI contract
25 lines
527 B
PHP
25 lines
527 B
PHP
<?php
|
|
|
|
namespace MintyPHP\Console\Commands\Module;
|
|
|
|
final class MigrateCommand extends AbstractModuleCommand
|
|
{
|
|
public function name(): string
|
|
{
|
|
return 'module:migrate';
|
|
}
|
|
|
|
public function description(): string
|
|
{
|
|
return 'Apply pending module SQL migrations';
|
|
}
|
|
|
|
public function execute(array $args, array $options): int
|
|
{
|
|
$result = $this->moduleRunner()->migrate();
|
|
fwrite(STDOUT, $result['message'] . PHP_EOL);
|
|
|
|
return (int) $result['exit_code'];
|
|
}
|
|
}
|