An Aspire integration for Flyway database migration tool.
Install
| Product | Versions |
|---|---|
| .NET |
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
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.