Flyway.net 1.1.1

dotnet add package Flyway.net --version 1.1.1
                    
NuGet\Install-Package Flyway.net -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Flyway.net" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Flyway.net" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Flyway.net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Flyway.net --version 1.1.1
                    
#r "nuget: Flyway.net, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Flyway.net@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Flyway.net&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Flyway.net&version=1.1.1
                    
Install as a Cake Tool

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. 1.0.0 (04/2020)
  • ☑ First Release
  1. 1.1.0 (04/2020)
  • ☑ Updated to version 6.4.0 of Flyway
  1. 1.1.1 (09/2020)
  • ☑ Fix: Flyway constructor accepts FlywayConfiguration
  1. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 43,442 9/18/2020
1.1.0 648 4/28/2020
1.0.0 8,319 4/20/2020