cli: scaffold migration runner adapter and category parsing

This commit is contained in:
StellaOps Bot
2025-12-06 16:32:07 +00:00
parent 7efee7dd41
commit 0a8f8c14af
2 changed files with 51 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
using System.Threading;
using System.Threading.Tasks;
using StellaOps.Infrastructure.Postgres.Migrations;
namespace StellaOps.Cli.Services;
internal sealed class MigrationRunnerAdapter
{
private readonly IMigrationRunner _runner;
public MigrationRunnerAdapter(IMigrationRunner runner)
{
_runner = runner;
}
public Task<int> RunAsync(string migrationsPath, MigrationCategory? category, CancellationToken cancellationToken) =>
_runner.RunAsync(migrationsPath, category, cancellationToken);
public Task<int> VerifyAsync(string migrationsPath, MigrationCategory? category, CancellationToken cancellationToken) =>
_runner.VerifyAsync(migrationsPath, category, cancellationToken);
}