Skip to main content
Version: 3.x

flyway CLI reference

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

Installation

dotnet add package ModularPipelines.Flyway

Import ModularPipelines.Flyway.Extensions, then resolve the service with context.Flyway().

Module example

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

public class RunCommandModule : Module<CommandResult>
{
protected override async Task<CommandResult?> ExecuteAsync(
IModuleContext context,
CancellationToken cancellationToken)
{
return await context.Flyway().Info(
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