Install Liquibase with Node Package Manager

You can install Node Package Manager (NPM) by following the steps on this page.

Tip: Concerned About Install Size? For a drastically smaller version of this package, be sure to check out our Zero-Dependency Peer-Dependency version. You can access this version under the tag @pd for Peer Dependency. This version of the package contains an unpacked size of 359 kB. Be sure to correctly configure your project.

Prerequisites

  1. Ensure you have the necessary permissions (such as administrator rights) to install, upgrade, or remove software on your system.
  2. Install NPM on your machine.

Install Liquibase

Latest stable version

  1. To install the latest version of Liquibase, run the following command:

    yarn add liquibase

    or:

    $ npm install --save liquibase
  2. Once installation is complete you can begin Using Liquibase with Node.js.

Example

Here is a Small Sandbox Project where you can easily evaluate changesets and node-liquibase against a PostgreSQL Database.

The Sandbox project includes startup scripts and examples to demonstrate how to use node-liquibase in TypeScript, JavaScript, and as a CLI tool.

Bundled Version Numbers

In order to make installation easier, node-liquibase is bundled with its coordinating version of Liquibase. This means that if you have a particular version of Liquibase, you can install a related specific version of node-liquibase and have Liquibase ready at your fingertips. Liquibase and node-liquibase both use a similar version strategy and NPM requires a version number bump for even the smallest change, so there will not be 100% alignment between the version numbers. It is safe to assume that the Major and Minor version numbers between the two projects will match on any given npm installation of node-liquibase.

Example

  1. Assume you are required to use Liquibase Core v4.3.3.
  2. node-liquibase released 4.3.3 alongside Liquibase Core, but needed to update documentation after the fact.
  3. node-liquibase patches its version number and releases 4.3.4.
  4. You could run yarn add Liquibase@4.3 which would install the latest patch version of 4.3. In this case it would be 4.3.4.
  5. The bundled Liquibase version would still be 4.3.3 but node-liquibase would be 4.3.4.

Note: If you wish to opt out of the bundled version you can check out our Peer Dependency release.

Related Links