DbUp vs Flyway for .NET: which migration tool to use (2026)

DbUp and Flyway work the same way at heart: ordered SQL files and a journal table recording what has run. The real difference is that DbUp is a .NET library and Flyway is a Java tool you shell out to. Pick DbUp for a .NET-only team; pick Flyway if you already use it elsewhere. This page is part of our wider .NET database migration tool comparison.

DbUpFlyway
Language / runtime.NET library (NuGet), runs inside your own app or a small console toolJava-based CLI and Docker image (flyway/flyway); no official .NET library
How migrations are writtenPlain .sql files (or C# scripts), run in filename orderPlain .sql files named V<version>__<description>.sql, plus repeatable R__ scripts
Journal tableSchemaVersions, managed by DbUpflyway_schema_history, managed by Flyway
Rollback / undoNone built in; write a new forward migrationUndo migrations (U prefix) are listed as an Enterprise feature; Community has none
CI/CD useCall PerformUpgrade() from a console project or at app startupRun the CLI or Docker image as a deploy step
LicensingOpen source (MIT)Community edition free (Apache 2.0 repository); Enterprise is commercial with quote-based pricing
EF Core interopIndependent of EF Core; works alongside it, or with Dapper / ADO.NETIndependent of EF Core; it only sees your SQL files
PostgreSQL and SQL ServerBoth supported (separate NuGet packages per database)Both supported, among many other databases

Flyway edition details checked October 3, 2026 on Redgate's Flyway editions page and the Flyway GitHub repository. DbUp is documented at dbup.readthedocs.io.

Using Flyway from C# / .NET

There is no official Flyway library for .NET. Flyway is a Java application, so from a .NET project you run its command line or its Docker image as a step in your deploy. Keep your scripts in a folder such as db/, named V1__create_orders.sql, V2__add_index.sql, and so on:

docker run --rm -v "$PWD/db:/flyway/sql" flyway/flyway \
  -url=jdbc:postgresql://localhost:5432/myapp \
  -user=myapp_migrator -password="$DB_PASSWORD" \
  migrate

Note the JDBC-style URL: Flyway does not take an Npgsql connection string. To launch it from C#, start the same command with System.Diagnostics.Process and check the exit code:

var psi = new ProcessStartInfo("flyway", "-url=jdbc:postgresql://localhost:5432/myapp -user=myapp_migrator migrate")
{
    RedirectStandardOutput = true,
};
psi.Environment["FLYWAY_PASSWORD"] = password;
using var p = Process.Start(psi)!;
Console.WriteLine(await p.StandardOutput.ReadToEndAsync());
await p.WaitForExitAsync();
if (p.ExitCode != 0) throw new Exception("Flyway migrate failed");

When to pick each

Pick DbUp when everyone on the team writes C#, you want migrations applied by a .NET process you already build and test, and you do not want a JVM or Docker image in the deploy path. Pick Flyway when your company already uses it for Java or Node services and wants one tool and one history table format everywhere, or when you want the option of Redgate's paid edition. If you want migrations generated from your model instead, see EF Core Migrations in the full .NET database migrations comparison.

FAQ

DbUp vs Flyway: which should I use for a .NET app?
DbUp if your team is purely .NET and wants migrations to run from C# with no JVM-based tooling. Flyway if your company already uses it on other stacks, or you want one migration tool across languages. Both use ordered SQL files and a journal table, so the day-to-day model is very similar.
Can I use Flyway from C#?
Not through an official library: Flyway is a Java tool. From a .NET project you run the Flyway CLI or the flyway/flyway Docker image as a step in your deploy, or start it with System.Diagnostics.Process.
Is Flyway free?
Flyway Community is free and the open-source repository is Apache 2.0. Flyway Enterprise is a paid Redgate product, and Redgate lists undo migrations among its Enterprise features. Check Redgate for current edition details.

Runs your migrations on every deploy

DotDeployer applies your DbUp, EF Core or shell-command migration before each release goes live.

Join the waitlist