Liquibase::Git - API and CLI to apply sql scripts from a git repo using Liquibase
version 0.0.1
use Liquibase::Git; my $liquibase = Liquibase::Git->new( %params ); $liquibase->apply;
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__.
<http://www.liquibase.org/>
App::Sqitch
Andrew Solomon <andrew.solomon@net-a-porter.com>
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.
To install Liquibase::Git, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Liquibase::Git
CPAN shell
perl -MCPAN -e shell install Liquibase::Git
For more information on module installation, please visit the detailed CPAN module installation guide.