Database/src/Cli/Migrations/NewCommand.php

19 lines
361 B
PHP
Raw Normal View History

2024-11-08 16:33:44 +01:00
<?php
namespace Nest\Cli\Commands\Migrations;
use Nest\Application;
use Nest\Cli\Commands\CommandHandler;
use Nest\Cli\Out;
class NewCommand extends CommandHandler
{
public function __invoke(string $name): void
{
// Create a new migration.
Application::get()->migrations()->newMigration($name);
Out::success("Migration successfully created.");
}
}