0

I have one changeset in my changelog file in my spring boot application. I want to run this changeset only on prod env not on dev env. Is there any way other than using context in liquibase for running chageset in specific env only (like any kind of precondition logic)? I have changeset like this-

<changeSet id="EVENT_ARCHIVE" author="jk">
                 <sql>some query</sql>
</changeSet>
Shadow
  • 33,525
  • 10
  • 51
  • 64
  • Does it help -> https://www.liquibase.org/blog/contexts-vs-labels – Deviprasad Sharma Apr 22 '21 at 09:45
  • is there any precondition logic? – Jayant Kokitkar Apr 22 '21 at 09:54
  • Have a look at answer on [this post](https://stackoverflow.com/questions/52645232/how-to-divide-liquibase-package-structure-for-dev-and-prod-environment-in-spring) – Rakhi Agrawal Apr 22 '21 at 10:04
  • Hi, welcome to StackOverflow ! You should take the [Tour](https://stackoverflow.com/tour) on StackOverflow, explaining how to properly ask a question. The community is here to help you, but you definitely need to provide more details to help us answer your question :) – Jissay Apr 22 '21 at 11:02
  • 1
    why you don't want to use context? It's used exactly for this usecase. If you want you can create some sql precondition that will check something in DB but that's maybe more complicated. – bilak Apr 22 '21 at 15:30

0 Answers0