Closed harshil93 closed 8 years ago
https://github.com/holman/ama/issues/765
Almost got my answer.
Yeah, #765 is pretty close.
Are there any established rules on doing db rollbacks for a service which is getting used while getting updated.
It depends on the database, but in MySQL, for example, lhm will let you migrate a table without downtime.
I think the real answer is that you should really avoid this as much as possible, ha. You don't want to be in a position where the only way to go forward is to rollback both the code and the data layer. Ideally you should have both the new code and the old code be capable of talking to both, and if there's anything serious that comes up during the migration it should hopefully become apparent prior to the switchover and prior to it becoming user-facing.
Many a time the new code introduces a new column in a table and this column starts getting filled with data as soon as the code hits production. I can understand doing a rollback of the web tier but then how would the old web tier talk with the new data teir. Are there any established rules on doing db rollbacks for a service which is getting used while getting updated.