0

I have an existing project which uses liquibase to manage Oracle, MySQL and SQLServer versions of the same database structure and I am adding Postgres support. I need to create the Postgres database under a specified schema (i.e. not the default public schema) and need the databasechangelog table to also be in that schema.

I realise that for Postgres I can achieve this by specifying the "defaultSchemaName" parameter in the updateDatabase target of my ant file, but as this is not currently set, I don't want to introduce any side-effects on the other RDBMs, which are managed from the same ant file. Does anyone know what the default value of this parameter is so that I can force the other RDBMs to use that, thus making my change backwards compatible?

jackos
  • 3
  • 1
  • 3

1 Answers1

5

The defaultSchemaName varies depending on the dbms implementation. On Oracle, the default defaultSchemaName is the username. On MS SQL Server, it is dbo. MySQL does not support schemas, so there is no default schema name. On Postgres the default schema name is 'public'.

To check this for yourself, you can get the liquibase source code from github and look for the classes that extend AbstractJdbcDatabase or that implement the Database interface. Most of these are in the package liquibase.database.core

SteveDonie
  • 8,700
  • 3
  • 43
  • 43