Reputation: 1265
How can I ask liquibase to drop schema when dropFirst is enabled? I'm using Postgres 9x and schema is created upon all DDL/DSL is executed:
--liquibase formatted sql
--changeset some-author:create-schema-foo
CREATE SCHEMA IF NOT EXISTS FOO;
I'm in spring-boot app and here is how dropFirst is enabled:
spring:
liquibase:
enabled: true
drop-first: true
Whenever I start migration I can see something happening but then there is error like "table already exists". But this table should be already removed when dropFirst is active, so I suppose I need to delete schema
Upvotes: 2
Views: 4476
Reputation: 1265
It was a problem with missing default-schema:
spring:
liquibase:
enabled: true
drop-first: true
default-schema: FOO
After this change it works as expected
Upvotes: 3