Skip to main content
Version: Next

flyway CLI reference

ModularPipelines.Flyway provides strongly typed access to the flyway CLI.

Installation

dotnet add package ModularPipelines.Flyway

Resolve the service with context.Tools.Flyway. For projects older than C# 14, import ModularPipelines.Flyway.Extensions and use the context.Flyway() extension method as a compatibility fallback.

Module example

using ModularPipelines.Context;
using ModularPipelines.Models;
using ModularPipelines.Modules;
using ModularPipelines.Flyway.Options;

public class RunCommandModule : Module<CommandResult>
{
protected override async Task<CommandResult> ExecuteAsync(
IModuleContext context,
CancellationToken cancellationToken)
{
return await context.Tools.Flyway.InfoAsync(
new FlywayInfoOptions(),
cancellationToken: cancellationToken);
}
}

Commands

CLI commandOptions record
flyway baselineFlywayBaselineOptions
flyway checkFlywayCheckOptions
flyway cleanFlywayCleanOptions
flyway deployFlywayDeployOptions
flyway infoFlywayInfoOptions
flyway initFlywayInitOptions
flyway list-enginesFlywayListEnginesOptions
flyway migrateFlywayMigrateOptions
flyway prepareFlywayPrepareOptions
flyway repairFlywayRepairOptions
flyway snapshotFlywaySnapshotOptions
flyway validateFlywayValidateOptions