Flyway.net
1.1.1
dotnet add package Flyway.net --version 1.1.1
NuGet\Install-Package Flyway.net -Version 1.1.1
<PackageReference Include="Flyway.net" Version="1.1.1" />
<PackageVersion Include="Flyway.net" Version="1.1.1" />
<PackageReference Include="Flyway.net" />
paket add Flyway.net --version 1.1.1
#r "nuget: Flyway.net, 1.1.1"
#:package Flyway.net@1.1.1
#addin nuget:?package=Flyway.net&version=1.1.1
#tool nuget:?package=Flyway.net&version=1.1.1
flyway.net
A Flyway wrapper for .NET
Maintained by
Bruno Monteiro, also known as b'uno.
How to use
First, download Flyway commandline tool
Note: Flyway commandline is required.
Install Nuget Package
Install-Package Flyway.net
Create an Instance
All you have to do is pass the Flyway's path in the constructor.
var flyway = new Flyway(@"[flyway path]");
Configure
You can configure in a few ways
Load Configurations
By default, Load() will load a file from filesystem
var config = new FlywayConfiguration(configurationFilePath: "[flyway path]\conf\flyway.conf").Load();
config.FlywayPath = @"[flyway path]"; // is required
var flyway = new Flyway(config);
In Memory Configurations
var config = new FlywayConfiguration();
configuration.FlywayPath = @"[flyway path]"; // is required
configuration.Url.Value = "jdbc:sqlserver://localhost;databaseName=master";
configuration.User.Value = "sa";
configuration.Password.Value = "Password";
var flyway = new Flyway(config);
Save Configurations
You do not need to save the configurations, but you have that possibility. By default, Save() will write a file to the filesystem
var config = new FlywayConfiguration("[flyway path]\conf\flyway.conf");
config.BaselineDescription.Value = "Some baseline description";
config.Save();
Customizing Loading and Saving
You can implement your own configuration saver and loader
Action<string, string> saver = (arg, config) => { /* ... */ };
Func<string, string[]> loader = arg => new string[] { /* ... */ };
var config = new FlywayConfiguration(saver, loader);
// config.Load();
// config.Save();
Execute
var cleanOutput = flyway.Clean();
var infoOutput = flyway.Info();
var baselineOutput = flyway.Baseline();
var migrateOutput = flyway.Migrate();
var undoOutput = flyway.Undo();
var repairOutput = flyway.Repair();
var validateOutput = flyway.Validate();
// Overriding the config
var cleanOutput = flyway.Clean(anotherConfig);
var infoOutput = flyway.Info(anotherConfig);
var baselineOutput = flyway.Baseline(anotherConfig);
var migrateOutput = flyway.Migrate(anotherConfig);
var undoOutput = flyway.Undo(anotherConfig);
var repairOutput = flyway.Repair(anotherConfig);
var validateOutput = flyway.Validate(anotherConfig);
Todo
- 1.0.0 (04/2020)
- ☑ First Release
- 1.1.0 (04/2020)
- ☑ Updated to version 6.4.0 of Flyway
- 1.1.1 (09/2020)
- ☑ Fix: Flyway constructor accepts FlywayConfiguration
- x
- ☐ Create the new options/parameters present in the new version of Flyway.
License
The flyway.net source code is issued under MIT license, a permissive free license, which means you can modify it as you please, and incorporate it into your own commercial or non-commercial software.
Free Software, oh yeah!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp1.0 is compatible. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 1.0
- Microsoft.NETCore.App (>= 1.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.