I’m trying to get started with LiquiBase 1.9.5 and calling generateChangeLog to get an initial file on an existing PostgreSQL (8.3/8.4) database. Problem I’m having is they have tables in different schema, other then public. Example table names are schemax.users, schemay.products. In the database in question, no tables are in the public instance. Does LiquiBase work with multiple active schema paths? Can I configure it to at least manipulate a specific schema path?
I was able to get liquibase working with a regular database who’s tables are in the public schema just fine. I tried setting the postgres.conf file so by default all schemas would be in the searchpath. Looking at the resulting SQL code generated by liquibase, the public schema is the only one being looked at. Can anyone provide any pointers?
Okay, didn’t see this documented in the command line, but saw it in the ant task… if you add --defaultSchemaName=schemax then it will pull what it can from that schema. I’ve got multiple schemas to do… so I’ll have to create one changeset per schema, which is fine in my case. But is there any way you can manipulate multiple schemas at once? Or will that have to be multiple changeset.xml files? (At least one per schema, and different calls per schema)
If you do add support for it, it would be nice if, for example, liquibase could look for user-created schemas for the generateChangelog or dbDoc commands, or at least, optionally, have the schemas to check be listed as an argument. Setting the defaultSchemaName for each schema and running the commands isn’t good because it creates multiple databasechangelog tables, one per ‘default’ schema. For me, this is not a show-stopped. Its a ‘nice to have’.
BTW, I really like Liquibase so far. Just started using it coming from a rails env back to Java, and its quite nice to have.
Creation and updates works fine using any schema, but the rollback is failing as it tries to delete an object without specifying the schema:
The change set works properly
ERROR: no existe el indice idx_table1
The sql command to rollback the index creation is not using the schema info.
Is this a bug from liquibase? what could i do to get the rollback working properly.
I’m using PostgreSQL 9.1 over windows 7 (x64). Java JDK 1.6.0_38, Liquibase Version: 2.0.5 (tried version 3.0.2, but It has other issues regarding Postgresql syntax, even the schema creation failed)