Skip to main content
net10.0net8.0net9.0

An Aspire integration for Flyway database migration tool.

Published
May 14, 2026
5mo ago
Total Downloads
64.8K
64,830

Install

dotnet add package CommunityToolkit.Aspire.Hosting.Flyway --version 13.3.0
ProductVersions
.NET
net10.0net8.0net9.0

README

CommunityToolkit.Aspire.Hosting.Flyway

An Aspire hosting integration for Flyway, a database migration tool that helps manage and automate database schema changes.

This integration is meant to be used in conjunction with a database resource, such as PostgreSQL, and the Flyway extension built for that database resource. It is also meant to be used by integration developers who want to add Flyway support to more database resources.

Getting started

Prerequisites

  • .NET 8.0 or later
  • Docker (for running the Flyway and database containers)

Installation

Install the package by adding a PackageReference to your AppHost project:

<PackageReference Include="CommunityToolkit.Aspire.Hosting.Flyway" />

Or to your file-based AppHost:

#:package CommunityToolkit.Aspire.Hosting.Flyway@13.*

Usage

In your AppHost project, call the AddFlyway method to add Flyway to your application with a migration scripts directory:

var builder = DistributedApplication.CreateBuilder(args);
var flyway = builder.AddFlyway("flyway", "./migrations");

// The rest of AppHost

builder.Build().Run();

The migrationScriptsPath parameter specifies the path to your migration scripts on the host machine, which will be mounted into the Flyway container.

Feedback & contributing

This is an early version of the Flyway integration. It is production-ready, but not yet feature complete. If you have any suggestions for features or improvements, please open an issue or a pull request on the GitHub repository. We welcome feedback and contributions.

Changes from Previous Version

No structural changes between v13.2.1-beta.604 and v13.3.0.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.