0

I have a very basic knowledge on liquibase.My project team is planning to use Liquibase for Test data snapshot. we have a cloud database (Postgresql) for different microservices. we have planned to take Test data snap before scripts execution and roll back the original state after the execution. Any insights on this would be really helpful. Thanks!

kathir43
  • 37
  • 7

2 Answers2

0

Liquibase has this capability which is a Pro feature. You can use liquibase rollbackToUpdate feature to rollback the database state to a specific deployment ID. Read more about the rollback Pro features here: https://docs.liquibase.com/commands/pro/rollbackoneupdate.html

NOTE: Before running the liquibase rollbackToUpdate, make sure to view the SQL log output of what all will be rolled back. You need to use liquibase rollbackTpUpdateSQL to get the log output in SQL format. https://docs.liquibase.com/commands/pro/rollbackoneupdatesql.html

Aditi
  • 357
  • 1
  • 7
0

You can use context attribut of liquibase, context = dev, test, faker.....

in producton you must execute liquibase with another context for skipping fake-data.

Sofyane MAKERRI
  • 395
  • 3
  • 5