Allow to create DATABASECHANGELOG* tables in another schema

Description

First of all, I would like to congratulate you on this awesome piece of software, I have successfully used it for the last 3 years.

Then, let me explain the use-case justifying this issue.

My client runs some Oracle synonym drop/create/grant scripts, executed by SYSTEM user. However, 1 server hosts multiple environments and they would really like to avoid the creation of Liquibase tables in this shared schema.

As a quickfix/workaround, I dynamically prefixed my changesets by environment in order to avoid clashes between changelog entries. But that does not solve the fundamental problem that LQB tables are created in SYSTEM schema.

I was thinking about introducing a new parameter, allowing to override the LQB table destination schema (in my case, the schema where synonyms are created). This would maintain the current behaviour by default (thus remaining backwards-compatible) and solve my problem.

What are your thoughts on this?

Environment

All

Activity

Show:
Nathan Voxland
July 31, 2013, 5:43 AM

The Database class allows you to call setDatabaseChangeLogLockTableName and setDatabaseChangeLogTableName to have different runs of liquibase use different table names within the schema. There was also a getLiquibaseSchemaName() method but unfortunately no corresponding setLiquibaseSchemaName.

In 3.0.3 I added the setLiquibaseSchemaName and setLiquibaseCatalogName() methods, but I won't close the issue yet because I need to add the hooks into Ant, command line, maven, etc. Depending on how you are calling liquibase, you should be able to add custom calls to these methods until we can get the hooks into the standard integrations.

Florent Biville
July 31, 2013, 8:05 AM

Hi, I'm using the Maven plugin, I can submit a Pull Request to this plugin to allow uses of setLiquibaseSchemaName and setLiquibaseCatalogName through configuration.
What do you think?

Florent Biville
August 1, 2013, 10:40 AM
Edited
Nathan Voxland
December 11, 2013, 2:10 PM

Merged in pull request

Fixed

Reporter

Florent Biville

Components

Fix versions

Affects versions

Priority

Major