Applies to
- Liquibase Pro
- Liquibase Open Source (Community)
Conditions
- Any version of Liquibase Pro or Open Source
Question
Can Liquibase deploy to multiple schemas in a single deployment?
Answer
Yes, Liquibase can deploy changes to multiple schemas within a single database. Liquibase supports multi-schema deployments by allowing you to specify the schemas explicitly in your changelog or configuration for the script.
For example, if you have the two following changesets
-- liquibase formatted sql
-- changeset liquibase_support:1
create table schemaA.employee (
emp_id serial primary key,
emp_name varchar(100),
emp_salary numeric(10, 2)
);
-- rollback drop table schemaA.employee
-- changeset liquibase_support:2
create table schemaB.employee (
emp_id serial primary key,
emp_name varchar(100),
emp_salary numeric(10, 2)
);
-- rollback drop table schemaB.employee
Liquibase will deploy the first changeset to schemaA, and the second changeset will be deployed to schemaB.
Related Article(s)
- N/A
Comments
0 comments
Article is closed for comments.