1
votes

Following the inputs from the below forum, system properties were specified and customized names for DATABASECHANGELOG & DATABASECHANGELOGLOCK tables were used & setup (on liquibase update execution). http://forum.liquibase.org/topic/configurable-databasechangelog-table-name

Liquibase version-3.5.1, Database-Oracle 12c, OS-Redhat Linux

But, on subsequent attempts to execute future liquibase updates (against same database schema), the execution fails as its trying to recreate the customized DATABASECHANGELOG table again - failing with Object Name already in use. This does not happen when trying to use the standard liquibase control tables names (i.e. DATABASECHANGELOG & DATABASECHANGELOGLOCK)

Is there an option to skip recreation of customized liquibase control tables OR another fix for this this issue?

2
Some additional info, this issue occurs when executed against Oracle 12c database schema. Tested the same scenario against Postgres 9.5 & its working as expected (configured changelog table behaves same as DATABASECHANGELOG). I'm using JDK 8 and using ojdbc7.jar downloaded from Oracle site. - Vikas Vij P

2 Answers

4
votes

Why setting these as system properties?

You can invoke liquibase like the following (or these arguments defined in the properties file):

liquibase <regular arguments > --liquibaseSchemaName=YOUR_SCHEMA \
     --databaseChangeLogTableName=YOUR_DBCHANGELOG \
     --databaseChangeLogLockTableName=YOUR_DBCHANGELOGLOCK ....

It works fine for us (liquibase 3.5.1, Oracle 12c).

Thanks

0
votes

The issue was due to the case-sensitivity of the custom table names when executing against oracle databases. Weird error, but its resolved when specifying the value in upper case (via system properties/command line)