By default liquibase create all objects on the public schema. However I created another schema and I want liquibase to use it.
I changed database URL by appending searchpath=mySchema
jdbc:postgresql://${host}:${db.port}/${db.name}?searchpath=mySchema
I also tried appending it with currentSchema=mySchema
jdbc:postgresql://${dbhost}:${db.port}/${db.name}?currentSchema=mySchema
but it both ways liquibase is still pointing into public schema.
Any help is appreciated..
Vaclav Bartacek :
You have to instruct Liquibase to create its meta tables DATABASECHANGELOG and DATABASECHANGELOCK in your schema as well. Just put the following line into your Liquibase properties file:\nliquibaseSchemaName=mySchema\n\nSee also https://docs.liquibase.com/workflows/liquibase-community/creating-config-properties.html",
2022-01-18T11:26:34
pifor :
You can try to change PG user account so that the right default schema is set at database connection time with something like:\n\nalter role r in database b set search_path='s';\n",
2020-03-10T14:50:18