We are using liquibase for postgres.
Our CI / CD process is like below.
- We have a single sql file for managing all DB changesets.
- We have multiple instances of a same microservice (AWS ECS) running talking to the same database.
- During release, in our CI we first execute the SQL changesets via liquibase and then proceed with the upgrade of microservice code.
- Services get upgraded one by one.
In the above approach we are observing a problem where let’s say a some column is dropped in a table and the application code is changed accordingly. But the code on each service instances gets upgraded one by one, so the service where the new code has not reached it will start throwing error if they try to access the dropped column.
Can someone let me know how people are handling these type of cases?
However, once all the service instances are upgraded with the new code, it starts working fine. I am specifically asking about the failure during upgade process when the new code has not reached every instance.
Liquibase Docker Version - 4.5.0