Skip to content

Using Liquibase with Cosmos DB

Azure Cosmos DB is a multi-model NoSQL database developed by Microsoft. For more information, see Azure Cosmos DB Documentation and Azure Cosmos DB: REST API Reference.

Note

This database is supported at or below the Contributed level. Functionality may be limited. Databases at the Contributed level are not supported by the Liquibase support team. Best-effort support is provided through our community forums.

For more information about the verification levels, see Database Verification and Support

Supported database versions

  • 4.35.1

Prerequisites

  1. Introduction to Liquibase – Dive into Liquibase concepts.
  2. Install Liquibase – Download Liquibase on your machine.
  3. How to Apply Your Liquibase Pro License Key – If you use Liquibase Pro, activate your license.

To access Cosmos DB, do one of the following:

Install drivers

All Users

List of JARs

To use Liquibase and Cosmos DB, you need several JAR files:

get_dependencies.bat

You can use this BAT script to download the files quickly:

setlocal
SET LIQUIBASE_COSMOSDB="4.29.1"
SET AZURE_COSMOS_VERSION="4.41.0"
SET AZURE_CORE_VERSION="1.37.0"
SET JACKSON_CORE="2.14.2"
SET SLF4J_API="2.0.6"
SET NETTY_BUFFER="4.1.90"
SET REACTOR_CORE="3.5.3"
SET REACTIVE_STREAMS="1.0.4"
SET JACKSON_DATABIND="2.14.2"
SET JACKSON_ANNOTATIONS="2.14.2"
SET JACKSON_MODULE_AFTERBURNER="2.14.2"
SET REACTOR_NETTY="1.1.4"
SET REACTOR_NETTY_CORE="1.1.4"
SET NETTY_RESOLVER="4.1.90"
SET REACTOR_NETTY_HTTP="1.1.4"
SET NETTY_TRANSPORT="4.1.90"
SET NETTY_TCNATIVE_BORINGSSL_STATIC="2.0.59"
SET NETTY_RESOLVER_DNS="4.1.90"
SET NETTY_HANDLER_PROXY="4.1.90"
SET NETTY_HANDLER="4.1.90"
SET NETTY_COMMON="4.1.90"
SET NETTY_CODEC_SOCKS="4.1.90"
SET NETTY_CODEC_HTTP="4.1.90"
SET NETTY_CODEC_HTTP2="4.1.90"
SET NETTY_CODEC_DNS="4.1.90"
SET NETTY_CODEC="4.1.90"
SET MICROMETER_CORE="1.10.4"
SET METRICS_CORE="4.2.17"
SET LATENCYUTILS="2.0.3"
SET JACKSON_DATATYPE_JSR310="2.14.2"
SET NETTY_TCNATIVE_CLASSES="2.0.59"
SET NETTY_TRANSPORT_CLASSES_KQUEUE="4.1.90"
SET SLF4J_SIMPLE="2.0.6"
SET MICROMETER_OBSERVATION="1.10.5"
SET MICROMETER_COMMONS="1.10.5"
curl -L  https://repo1.maven.org/maven2/com/azure/azure-cosmos/%AZURE_COSMOS_VERSION%/azure-cosmos-%AZURE_COSMOS_VERSION%.jar --output azure-cosmos-%AZURE_COSMOS_VERSION%.jar
curl -L  https://repo1.maven.org/maven2/com/azure/azure-core/%AZURE_CORE_VERSION%/azure-core-%AZURE_CORE_VERSION%.jar --output  azure-core-%AZURE_CORE_VERSION%.jar
curl -L  https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/%JACKSON_CORE%/jackson-core-%JACKSON_CORE%.jar --output jackson-core-%JACKSON_CORE%.jar 
curl -L  https://repo1.maven.org/maven2/org/slf4j/slf4j-api/%SLF4J_API%/slf4j-api-%SLF4J_API%.jar --output slf4j-api-%SLF4J_API%.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-buffer/%NETTY_BUFFER%.Final/netty-buffer-%NETTY_BUFFER%.Final.jar --output netty-buffer-%NETTY_BUFFER%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/projectreactor/reactor-core/%REACTOR_CORE%/reactor-core-%REACTOR_CORE%.jar --output reactor-core-%REACTOR_CORE%.jar
curl -L  https://repo1.maven.org/maven2/io/projectreactor/netty/reactor-netty-core/%REACTOR_NETTY_CORE%/reactor-netty-core-%REACTOR_NETTY_CORE%.jar --output reactor-netty-core-%REACTOR_NETTY_CORE%.jar
curl -L  https://repo1.maven.org/maven2/io/projectreactor/netty/reactor-netty-http/%REACTOR_NETTY_HTTP%/reactor-netty-http-%REACTOR_NETTY_HTTP%.jar --output reactor-netty-http-%REACTOR_NETTY_HTTP%.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-resolver/%NETTY_RESOLVER%.Final/netty-resolver-%NETTY_RESOLVER%.Final.jar --output netty-resolver-%NETTY_RESOLVER%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-transport/%NETTY_TRANSPORT%.Final/netty-transport-%NETTY_TRANSPORT%.Final.jar --output netty-transport-%NETTY_TRANSPORT%.Final.jar
curl -L  https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/%REACTIVE_STREAMS%/reactive-streams-%REACTIVE_STREAMS%.jar --output reactive-streams-%REACTIVE_STREAMS%.jar
curl -L  https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/%JACKSON_DATABIND%/jackson-databind-%JACKSON_DATABIND%.jar --output jackson-databind-%JACKSON_DATABIND%.jar
curl -L  https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/%JACKSON_ANNOTATIONS%/jackson-annotations-%JACKSON_ANNOTATIONS%.jar --output jackson-annotations-%JACKSON_ANNOTATIONS%.jar
curl -L  https://repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-afterburner/%JACKSON_MODULE_AFTERBURNER%/jackson-module-afterburner-%JACKSON_MODULE_AFTERBURNER%.jar --output jackson-module-afterburner-%JACKSON_MODULE_AFTERBURNER%.jar
curl -L  https://repo1.maven.org/maven2/io/projectreactor/netty/reactor-netty/%REACTOR_NETTY%/reactor-netty-%REACTOR_NETTY%.jar --output reactor-netty-%REACTOR_NETTY%.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-resolver/%NETTY_RESOLVER%.Final/netty-resolver-%NETTY_RESOLVER%.Final.jar --output netty-resolver-%NETTY_RESOLVER%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-transport-native-unix-common/%NETTY_TRANSPORT%.Final/netty-transport-native-unix-common-%NETTY_TRANSPORT%.Final.jar --output netty-transport-native-unix-common-%NETTY_TRANSPORT%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/%NETTY_TRANSPORT%.Final/netty-transport-native-epoll-%NETTY_TRANSPORT%.Final-linux-x86_64.jar --output netty-transport-native-epoll-%NETTY_TRANSPORT%.Final-linux-x86_64.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/%NETTY_TCNATIVE_BORINGSSL_STATIC%.Final/netty-tcnative-boringssl-static-%NETTY_TCNATIVE_BORINGSSL_STATIC%.Final.jar --output netty-tcnative-boringssl-static-%NETTY_TCNATIVE_BORINGSSL_STATIC%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-resolver-dns/%NETTY_RESOLVER_DNS%.Final/netty-resolver-dns-%NETTY_RESOLVER_DNS%.Final.jar --output netty-resolver-dns-%NETTY_RESOLVER_DNS%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-handler-proxy/%NETTY_HANDLER_PROXY%.Final/netty-handler-proxy-%NETTY_HANDLER_PROXY%.Final.jar --output netty-handler-proxy-%NETTY_HANDLER_PROXY%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-handler/%NETTY_HANDLER%.Final/netty-handler-%NETTY_HANDLER%.Final.jar --output netty-handler-%NETTY_HANDLER%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-common/%NETTY_COMMON%.Final/netty-common-%NETTY_COMMON%.Final.jar --output netty-common-%NETTY_COMMON%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-codec-socks/%NETTY_CODEC_SOCKS%.Final/netty-codec-socks-%NETTY_CODEC_SOCKS%.Final.jar --output netty-codec-socks-%NETTY_CODEC_SOCKS%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-codec-http/%NETTY_CODEC_HTTP%.Final/netty-codec-http-%NETTY_CODEC_HTTP%.Final.jar --output netty-codec-http-%NETTY_CODEC_HTTP%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-codec-http2/%NETTY_CODEC_HTTP2%.Final/netty-codec-http2-%NETTY_CODEC_HTTP2%.Final.jar --output netty-codec-http2-%NETTY_CODEC_HTTP2%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-codec-dns/%NETTY_CODEC_DNS%.Final/netty-codec-dns-%NETTY_CODEC_DNS%.Final.jar --output netty-codec-dns-%NETTY_CODEC_DNS%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-codec/%NETTY_CODEC%.Final/netty-codec-%NETTY_CODEC%.Final.jar --output netty-codec-%NETTY_CODEC%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/micrometer/micrometer-core/%MICROMETER_CORE%/micrometer-core-%MICROMETER_CORE%.jar --output micrometer-core-%MICROMETER_CORE%.jar
curl -L  https://repo1.maven.org/maven2/io/dropwizard/metrics/metrics-core/%METRICS_CORE%/metrics-core-%METRICS_CORE%.jar --output metrics-core-%METRICS_CORE%.jar
curl -L  https://repo1.maven.org/maven2/org/latencyutils/LatencyUtils/%LATENCYUTILS%/LatencyUtils-%LATENCYUTILS%.jar --output LatencyUtils-%LATENCYUTILS%.jar
curl -L  https://repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/%JACKSON_DATATYPE_JSR310%/jackson-datatype-jsr310-%JACKSON_DATATYPE_JSR310%.jar --output jackson-datatype-jsr310-%JACKSON_DATATYPE_JSR310%.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-tcnative-classes/%NETTY_TCNATIVE_CLASSES%.Final/netty-tcnative-classes-%NETTY_TCNATIVE_CLASSES%.Final.jar --output netty-tcnative-classes-%NETTY_TCNATIVE_CLASSES%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-transport-classes-kqueue/%NETTY_TRANSPORT_CLASSES_KQUEUE%.Final/netty-transport-classes-kqueue-%NETTY_TRANSPORT_CLASSES_KQUEUE%.Final.jar --output netty-transport-classes-kqueue-%NETTY_TRANSPORT_CLASSES_KQUEUE%.Final.jar
curl -L  https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/%SLF4J_SIMPLE%/slf4j-simple-%SLF4J_SIMPLE%.jar --output slf4j-simple-%SLF4J_SIMPLE%.jar
curl -L  https://github.com/liquibase/liquibase-cosmosdb/releases/download/liquibase-cosmosdb-%LIQUIBASE_COSMOSDB%/liquibase-cosmosdb-%LIQUIBASE_COSMOSDB%.jar --output liquibase-cosmosdb-%LIQUIBASE_COSMOSDB%.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-transport-classes-epoll/%NETTY_TRANSPORT%.Final/netty-transport-classes-epoll-%NETTY_TRANSPORT%.Final.jar --output netty-transport-classes-epoll-%NETTY_TRANSPORT%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/netty/netty-transport-native-kqueue/%NETTY_TRANSPORT%.Final/netty-transport-native-kqueue-%NETTY_TRANSPORT%.Final.jar --output netty-transport-native-kqueue-%NETTY_TRANSPORT%.Final.jar
curl -L  https://repo1.maven.org/maven2/io/micrometer/micrometer-observation/%MICROMETER_OBSERVATION%/micrometer-observation-%MICROMETER_OBSERVATION%.jar --output micrometer-observation-%MICROMETER_OBSERVATION%.jar
curl -L  https://repo1.maven.org/maven2/io/micrometer/micrometer-commons/%MICROMETER_COMMONS%/micrometer-commons-%MICROMETER_COMMONS%.jar --output micrometer-commons-%MICROMETER_COMMONS%.jar
endlocal

Place your JAR file(s) in the liquibase/lib directory.

Maven Users (additional step)

If you use Maven, you must include the driver JAR as a dependency in your pom.xml file.

Maven pom.xml file

<dependency>
    <groupId>org.liquibase.ext</groupId>
    <artifactId>liquibase-cosmosdb</artifactId>
    <version>4.29.1</version>
</dependency>
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-core</artifactId>
    <version>1.37.0</version>
</dependency>
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-cosmos</artifactId>
    <version>4.41.0</version>
</dependency>
<dependency>
    <groupId>io.dropwizard.metrics</groupId>
    <artifactId>metrics-core</artifactId>
    <version>4.2.17</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-annotations</artifactId>
    <version>2.14.2</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.14.2</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.14.2</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.datatype</groupId>
    <artifactId>jackson-datatype-jsr310</artifactId>
    <version>2.14.2</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.module</groupId>
    <artifactId>jackson-module-afterburner</artifactId>
    <version>2.14.2</version>
</dependency>
<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-core</artifactId>
    <version>1.10.5</version>
</dependency>
<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-observation</artifactId>
    <version>1.10.5</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-buffer</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-codec</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-codec-dns</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-codec-http</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-codec-http2</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-codec-socks</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-common</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-handler</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-handler-proxy</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-resolver</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-resolver-dns</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-tcnative</artifactId>
    <version>2.0.59.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-tcnative-boringssl-static</artifactId>
    <version>2.0.59.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-classes-epoll</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-classes-kqueue</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-epoll</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-kqueue</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-unix-common</artifactId>
    <version>4.1.90.Final</version>
</dependency>
<dependency>
    <groupId>org.reactivestreams</groupId>
    <artifactId>reactive-streams</artifactId>
    <version>1.0.4</version>
</dependency>
<dependency>
    <groupId>io.projectreactor</groupId>
    <artifactId>reactor-core</artifactId>
    <version>3.5.4</version>
</dependency>
<dependency>
    <groupId>io.projectreactor.netty</groupId>
    <artifactId>reactor-netty</artifactId>
    <version>1.1.5</version>
</dependency>
<dependency>
    <groupId>io.projectreactor.netty</groupId>
    <artifactId>reactor-netty-core</artifactId>
    <version>1.1.5</version>
</dependency>
<dependency>
    <groupId>io.projectreactor.netty</groupId>
    <artifactId>reactor-netty-http</artifactId>
    <version>1.1.5</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>2.0.6</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>2.0.6</version>
</dependency>

Database connection

Configure connection

  1. Ensure your Cosmos DB database is configured. See Quickstart: Build a Java app to manage Azure Cosmos DB SQL API data for more information.

  2. Specify the database URL in the liquibase.properties file (defaults file), along with other properties you want to set a default value for. Liquibase does not parse the URL. You can either specify the full database connection string or specify the URL using your database's standard JDBC format:

    Connection String Examples

    Syntax

    cosmosdb://<cosmosdb-account-name>.documents.azure.com:<AccountKey>@<cosmosdb-account-name>.documents.azure.com:<port>/<database>
    

    Example

    url: cosmosdb://amalik.documents.azure.com:Pza0RV29y...CDbOjTZjg==@amalik.documents.azure.com:443/SampleDB
    

    Replace <cosmosdb-account-name> with the name you chose for your Azure Cosmos DB. Replace <accountKey> with your private account key.

    For more information, see Tutorial: Connect to an Azure Cosmos account using an Azure Private Endpoint.


    Syntax

    cosmosdb://AccountEndpoint=https://<cosmosdb-account-name>.documents.azure.com:443;AccountKey=<accountKey>;
    

    Example

    url: cosmosdb://AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R...IZnqyMsEcaGQy67XIw/Jw==;
    

    This example shows the default account key, formatted for readability. For more information, see Install and use the Azure Cosmos DB Emulator for local development and testing.


    For more information, see GitHub: liquibase-cosmosdb § Adjust connection string.

!!! note If you use the connection pooling manager PG Bouncer, you must specify the connection port 5432.

  1. (optional) Enable Liquibase Pro capabilities

    To apply a Liquibase Pro key to your project, add the following property to the Liquibase properties file:

    liquibase.licenseKey: <paste key here>
    

Test connection

  1. Create a text file called changelog (.xml, .sql, .json, or .yaml) in your project directory and add a changeset.

    If you already created a changelog using the init project command, you can use that instead of creating a new file. When adding onto an existing changelog, be sure to only add the changeset and to not duplicate the changelog header.

    -- liquibase formatted sql
    
    -- changeset my_name:1
    CREATE TABLE test_table 
    (
      test_id INT, 
      test_column INT, 
      PRIMARY KEY (test_id)
    )
    

    <?xml version="1.0" encoding="UTF-8"?>
    <databaseChangeLog
      xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
      xmlns:pro="http://www.liquibase.org/xml/ns/pro"
      xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
        http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd">
    
      <changeSet id="1" author="my_name">
        <createTable tableName="test_table">
          <column name="test_id" type="int">
            <constraints primaryKey="true"/>
          </column>
          <column name="test_column" type="INT"/>
        </createTable>
      </changeSet>
    
    </databaseChangeLog>
    

    databaseChangeLog:
      - changeSet:
        id: 1
        author: my_name
        changes:
        - createTable:
          tableName: test_table
          columns:
          - column:
            name: test_column
              type: INT
              constraints:
                primaryKey:  true
                nullable:  false
    

    {
      "databaseChangeLog": [
        {
          "changeSet": {
            "id": "1",
            "author": "my_name",
            "changes": [
              {
                "createTable": {
                  "tableName": "test_table",
                  "columns": [
                    {
                      "column": {
                        "name": "test_column",
                        "type": "INT",
                        "constraints": {
                          "primaryKey": true,
                          "nullable": false
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
    

  2. Navigate to your project folder in the CLI and run the Liquibase status command to see whether the connection is successful:

    liquibase status --username=test --password=test --changelog-file=<changelog.xml>
    

    Note

    You can specify arguments in the CLI or keep them in the Liquibase properties file.

    If your connection is successful, you'll see a message like this:

    1 changeset has not been applied to <your_jdbc_url>
    Liquibase command 'status' was executed successfully.
    
  3. Inspect the SQL with the update-sql command. Then make changes to your database with the update command.

    liquibase update-sql --changelog-file=<changelog.xml>
    liquibase update --changelog-file=<changelog.xml>
    

    If your update is successful, Liquibase runs each changeset and displays a summary message ending with:

    Liquibase: Update has been successful.
    Liquibase command 'update' was executed successfully.
    
  4. From a database UI tool, ensure that your database contains the test_table you added along with the DATABASECHANGELOG table and DATABASECHANGELOGLOCK table.

Now you're ready to start making deployments with Liquibase!

Troubleshooting

If you use Azure Database with PostgreSQL and the connection pooling manager PG Bouncer, you may receive this error when you try to use Liquibase:

prepared statement ... does not exist

If you receive this error, it is because you are using the connection port 6432, which is typical for PG Bouncer. However, for Liquibase's prepared statements to work, the connection pooling mode must be set to session. However, using Azure with PostgreSQL does not support the session value. Therefore, Liquibase's prepared statements may fail, causing the execution to fail.

To resolve this error, set your connection port to 5432.