Liquibase disable some properties of the scripts

22 views Asked by At

I have migrated the Database from Oracle to Postgres. In Oracle, we`ve used tablespaces in the liquibase scripts, but in my new Postgres Database I do not want to use these tablespaces anymore. Is the a proper way to apply these scripts over a new environment that does not have any tablespaces (ignore that property)?

I`m running liquibase during Spring Boot start-up phase.

1

There are 1 answers

2
Alexander Pletnev On

Liquibase changesets have a dedicated dbms attribute to distinct the changesets incompatible between the different DB management systems:

Specifies which database type(s) a changeset is to be used for. See valid database type names on Liquibase Database Tutorials. Separate multiple databases with commas. Specify that a changeset is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.

So, you would need to use dbms="oracle" for Oracle-specific changesets, and dbms="postgresql" for Postgres.