Cannot migrate multiple times using one Liquibase instance

Description

The following code does not work as intended.

Given several schemas, Liquibase will only migrate the first schema. And "ignore" the rest. Note that from the logs, Liquibase seems to be trying to read the databasechangelog tables of each respective schema, but it seems it's misleading:

The workaround is to create a fresh PostgresDatabase instance and Liquibase instance for each iteration.

However the goal is to reuse the parsing and preprocessing, and reuse as much as possible (including the JDBC connection).

Environment

Tomcat 8, Java 8, PostgreSQL 9.3

Activity

Show:

Hendy Irawan June 30, 2015 at 8:18 AM

Update: A better workaround is possible: Use a single PostgresDatabase and Liquibase, but for each iteration/schema, create a Connection and manually execute SET SCHEMA as per CORE-1873, e.g.

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created June 28, 2014 at 10:52 AM
Updated March 15, 2016 at 3:04 AM