How does dropall work with multiple schemas?
Last updated: March 24, 2026
The dropall command drops all objects from the schemas you specify. When used with --schemas=, Liquibase treats target schemas (listed in the parameter) and the current schema (used for Liquibase tracking tables) differently.
Behavior
When you run dropall with --schemas=, Liquibase treats schemas differently depending on whether they are target schemas or the current schema:
Target schemas (
--schemas=schema1,schema2): All database objects are dropped, including tables, views, sequences, and functions.Current schema: Only the Liquibase tracking tables are dropped (
databasechangeloganddatabasechangeloglock). No other objects are removed.
Usage scenarios
Scenario 1: Using the default schema
If no currentSchema is specified in the connection URL, the database default schema is used as the current schema.
liquibase dropall --schemas=schema1,schema2
With this configuration:
All objects are dropped from
schema1andschema2.The
databasechangeloganddatabasechangeloglocktables are dropped from the default schema.No other objects are removed from the default schema.
Scenario 2: Explicit current schema in connection URL
If you specify currentSchema in the connection URL, that schema becomes the current schema. For example:
jdbc:postgresql://localhost:5432/mydb?currentSchema=schema0
With this configuration:
All objects are dropped from
schema1andschema2.The
databasechangeloganddatabasechangeloglocktables are dropped fromschema0.No other objects are removed from
schema0.
Important notes
The current schema is protected from a full wipe. Only Liquibase tracking tables are removed from it, whether it is the default schema or explicitly specified.
Schemas listed in
--schemas=are completely cleaned of all database objects.This behavior lets you clean up target schemas completely while preserving other objects in the schema that stores Liquibase metadata.