The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Liquibase::Git - API and CLI to apply sql scripts from a git repo using Liquibase

VERSION

version 0.0.1

SYNOPSIS

  use Liquibase::Git;

  my $liquibase = Liquibase::Git->new(
   %params
  );

  $liquibase->apply;

DESCRIPTION

Install this module on a server with Liquibase installed

Assume you have an app with:

  • git repo https://github.com/foo/myapp.git containing a liquibase changeset

  • a database mydb-db1

  • a database host db1.myapp.com

The following code

  my $liquibase = Liquibase::Git->new(
     username          => 'liquibase',
     password          => 'foobar',
     db                => 'mydb-db1',
     hostname          => 'db1.myapp.com'
     git_repo          => 'https://github.com/foo/myapp.git',
     git_changeset_dir => 'db/db1',
     git_identifier    => 'master',
     db_type           => 'postgresql',
     port              => '5432', # OPTIONAL
     changeset_file    => 'changeset.xml',
  );

  $liquibase->update;

applies the sql changes defined by

  https://github.com/foo/myapp.git:db/db1/changeset.xml

on the database mydb-db1.

  $liquibase->updateSQL;

Only prints out the changes which would take place.

__THIS IS A DEVELOPMENT RELEASE. MAY CHANGE WITHOUT NOTICE__.

REFERENCE

<http://www.liquibase.org/>

ALTERNATIVE

App::Sqitch

Utilities

AUTHOR

Andrew Solomon <andrew.solomon@net-a-porter.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Net-a-Porter.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.