command("migrations") ->description("Migrations manager.") ->subcommands([ "migrate" => fn (CommandDefinition $subcommand) => $subcommand ->description("Execute all remaining migrations.") ->handler(MigrateCommand::class) , "migrateOne" => fn (CommandDefinition $subcommand) => $subcommand ->description("Perform one migration.") ->parameter("migrationId", fn (ParameterDefinition $parameter) => $parameter->description("Migration ID of migration to execute.")) ->handler(MigrateOneCommand::class) , "rollback" => fn (CommandDefinition $subcommand) => $subcommand ->description("Rollback latest migration.") ->handler(RollbackCommand::class) , "new" => fn (CommandDefinition $subcommand) => $subcommand ->description("Generate a migration with the given name.") ->parameter("name", fn (ParameterDefinition $parameter) => $parameter->description("Name of the new migration.")) ->handler(NewCommand::class) , ]); } }