Node.js wrap for Liquibase
$ npm install --save liquibase
const liquibase = require('liquibase');
liquibase({
defaultsFile: 'resources/liquibase/liquibase.properties'
// liquibase: 'lib/liquibase-core-3.5.3.jar',
// driver: 'org.postgresql.Driver',
// classpath: 'lib/postgresql-9.4-1201.jdbc4.jar',
// changeLogFile: 'resources/liquibase/db.changelog.xml',
// url: 'jdbc:postgresql://localhost:5432/postgres',
// username: 'postgres',
// password: 'admin'
})
.run('update')
.then(() => console.log('success'))
.catch((err) => console.log('fail', err));
const liquibase = require('liquibase');
liquibase({
changeLogFile: 'resources/liquibase/db.changelog.xml',
url: 'jdbc:postgresql://localhost:5432/postgres',
username: 'postgres',
password: 'admin'
})
.run('<action>', '<action-params>')
.then(() => console.log('success'))
.catch((err) => console.log('fail', err));
MIT © Pablo De Nadai