Liquibase Example with Labels

Hi Team,

May I get any any example for Label filtrations using Liquibase.


–liquibase formatted sql

–changeset srini:table1
–labels: dev, devfunctional, stage

create table table1 (id int);

–rollback drop table table1;

–changeset srini:table2
–labels: dev, stage

create table table2 (id int);

–rollback drop table table2;

–changeset srini:table3
–labels: stage

create table table3 (id int);

–rollback drop table table3;


How do I filter the Database changes with labels. In my above example I want to do the DB changes based on the label identifier “dev”

May I get some example here for liquibase command?

Add the --labelFilter parameter to you Liquibase CLI execution:

liquibase --labelFilter=dev

Hi @daryldoak Thank you very much, It helps a lot.