New Webinar: The New GitHub Action That Replaces 50 Others
Blog Post

Managing Multiple Schemas with Liquibase

November 29, 2022

See Liquibase in Action

Accelerate database changes, reduce failures, and enforce governance across your pipelines.

Watch a Demo

Table of contents

Content updated September 2025

Key Takeaways

  • Liquibase supports deployments to single or multiple schemas/databases.
  • Teams must prefix objects with schema/database names in SQL scripts.
  • Proper Git repository structure is critical to ensure changelogs apply in the right order.
  • For single-team, multi-schema projects, changes can be organized in dedicated directories.
  • For multi-team, shared schema projects, a dedicated SQL repository is recommended.
  • Liquibase best practices and sample pipelines provide guidance for both Oracle and SQL Server scenarios.

Liquibase offers flexibility whether deploying changes to a single schema or multiple schemas. Depending on the database platform, there could even be a use case for deploying changes to multiple databases. An extension of this use case is that multiple schemas - or multiple databases - are shared between multiple teams, that is, multiple teams make changes to the same schemas or databases.

Whether teams are deploying to multiple dedicated schemas/databases - or multiple shared schemas/databases - it is important to pay attention to a few essential items:

  • How do SQL script authors write their scripts when their scripts are deploying to multiple schemas - or databases? This typically requires prefixing all objects with the schema name - or the database name.
  • Structuring your Git repository for multiple schemas - or databases - so that the Liquibase changelog file can apply the proper deployment recipe and in the correct order.
  • When a single team deploys to multiple schemas - or databases - they can structure their application repository by dedicating a directory for database changes.

Multiple DatabasesApplication repository for Application Repository for multiple Schemas
  • When schemas – or databases – are shared across multiple teams, then it is not possible to use each team’s own application repository. This requires setting up a dedicated SQL repository for shared schemas/databases.
Shared DatabasesDedicated SQL Repository for Shared SchemasDedicated SQL Repository for 

We have published best practices for how Liquibase can be used to handle these use cases. These also provide sample changelogs as well as a sample pipeline code, with Liquibase CLI commands, for deploying changes to multiple schemas - or databases.

Frequently Asked Questions

Q1: Can Liquibase deploy to multiple schemas?
Yes. Liquibase supports deploying changes to one or more schemas or even multiple databases.

Q2: How should SQL scripts be written for multiple schemas?
Always prefix objects with the schema or database name to ensure accuracy during deployment.

Q3: How do I organize my Git repository for multiple schemas?
Structure your repository so changelogs are stored in schema-specific directories or in a dedicated SQL repository for shared environments.

Q4: What if multiple teams work on the same database?
Use a centralized, dedicated SQL repository that all teams contribute to, ensuring consistency and avoiding conflicts.

Q5: Are there Liquibase resources for multi-schema deployments?
Yes. Liquibase provides best practices, sample changelogs, and pipeline code for both Oracle and SQL Server use cases.

Adeel Malik
Adeel Malik
Share on:

See Liquibase in Action

Accelerate database changes, reduce failures, and enforce governance across your pipelines.

Watch a Demo