Files
breadcrumb-the-shire/core/Console/Commands/Module/MigrateCommand.php

25 lines
527 B
PHP
Raw Normal View History

2026-03-19 19:04:28 +01:00
<?php
namespace MintyPHP\Console\Commands\Module;
final class MigrateCommand extends AbstractModuleCommand
2026-03-19 19:04:28 +01:00
{
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);
2026-03-19 19:04:28 +01:00
return (int) $result['exit_code'];
2026-03-19 19:04:28 +01:00
}
}