Case problem on Oracle

Hello,

We use several different DBs with liquibase (MySQL, Postgres, Oracle, MSSQL) and we met a problem while running our existing change sets on Oracle. We overrode the default database change log table name in our maven configuration. We had no problem with it on other DBs but it did not work on Oracle. The problem is that by default Oracle uses uppercase names for every created objects so even if we write these table names with lower case in our maven POMs, they will be in data dictionary (all_tables) with upper case names. When Liquibase tries to check if they already exist it won’t find them and tries to create them. Creation fails with the following log entries:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.329 s
[INFO] Finished at: 2016-10-24T17:09:45+02:00
[INFO] Final Memory: 27M/585M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.2:update (default-cli) on project auth-jar: Error setting up or running Liquibase: ORA-00955: name is already used by an existing object
[ERROR] [Failed SQL: CREATE TABLE au_db_changelog (ID VARCHAR2(255) NOT NULL, AUTHOR VARCHAR2(255) NOT NULL, FILENAME VARCHAR2(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED NUMBER(10) NOT NULL, EXECTYPE VARCHAR2(10) NOT NULL, MD5SUM VARCHAR2(35), DESCRIPTION VARCHAR2(255), COMMENTS VARCHAR2(255), TAG VARCHAR2(255), LIQUIBASE VARCHAR2(20), CONTEXTS VARCHAR2(255), LABELS VARCHAR2(255))]
[ERROR] -> [Help 1]

We located the problem which could be fixed pretty easily (at least we think it could be :slight_smile: ). Here is the problematic line:
Source on Github

The fix would be using database.correctObjectName(tableName, Table.class) instead of tableName.

There might be similar problems in other queryOracle methods.

Zoltán Kinyó