-
Notifications
You must be signed in to change notification settings - Fork 152
Description
.NET Aspire issue link
No response
Overview
Flyway is database migration tool that supports myriad of databases. An Aspire integration will help people who use Flyway to run their application(s) with all the database migration steps, eliminating the need to run manual steps, or create custom commands.
Usage example
I have a proof-of-concept implementation, with the usage, in this Gist.
// PostgreSQL example
const string dbName = "db";
var postgres = builder.AddPostgres("postgres", "postgres", "super_secret");
var database = postgres.AddDatabase("myDatabase", dbName);
_ = builder
.AddFlyway("flyway", "./database")
.WithImageTag("11")
.WithReference(database, dbName) // Not quite sure this is the most idiomatic way; we may need to pass more parameters
.WaitFor(database);Additional context
Because Flyway works with different database systems, and each system has its own requirement for the connection string, or rather the JDBC connection that Flyway uses, this integration will not be a single integration. What I envision it to be is a per-database-system integration. The bases of the integration will be in a library called CommunityToolkit.Aspire.Flyway, for example, and then their will be an integration for each database system that we want to support, and is supported by Flyway, such as CommunityToolkit.Aspire.Flyway.SqlServer, CommunityToolkit.Aspire.Flyway.PostgreSql, CommunityToolkit.Aspire.Flyway.MariaDb, and so on.
Help us help you
Yes, I'd like to be assigned to work on this item