Skip to content

papauorg/Cake.Liquibase

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cake.Liquibase

Addin for running liquibase database migrations with the Cake build system.

Build status

NuGet

Dependencies

Please note that neither the required Java Runtime Environment (JRE) nor the liquibase executables are provided with this addin and need to be provided separately.

NuGet package

As of now there is only a preview NuGet package available. An official one will be created as soon as I'm satisfied with the code to release a first version.

Usage

#addin "Cake.Liquibase"

var target = Argument("target", "Default");

Task("Default")
    .Does(() => {
        // Install Liquibase.Cli package for the liquibase executables (or include it in the packages.config) 
        NuGetInstall("Liquibase.Cli", new NuGetInstallSettings {
            Version  = "3.3.5",
            OutputDirectory = "./tools"
        });

        UpdateDatabase(s => {
            s.ChangeLogFile = "YourChangeLog.xml";
            s.Url = "jdbc:sqlite:exampledb.sqlite";
            s.JavaSettings.Classpaths.Add("./sqlite-jdbc-3.20.0.jar"); // additional drivers / jar files
        });
    });

RunTarget(target);

When not specifying a java executable the PATH is searched for "java" and it is used when found.

Limitations

This is currently an early stage of the addin. As of now only the liquibase "update" command is supported. The most important settings can be used via the LiquibaseSettings class. If you are missing settings, you can use the LiquibaseSettings.ArgumentCustomization property to define them as string. Details on how to use them can be found on the Cake website (ToolSettings).

If you are missing a command or parameter feel free to send a pull request.

About

Addin for running liquibase database migrations with the Cake build system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published