Fantasy QB Streaming Options

Week 10 of the NFL season is officially behind us and now we are getting to the point of the season where every matchup counts and there is no room for error. Unfortunately for fantasy managers in…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Expand Contract Pattern and Continuous Delivery of Databases

The premise for Continuous Delivery is helping the business to deliver value continuously. Yes, continuous can be much more continuous than you think and subjective too.

Parallel Change using Branch by Abstraction

Parallel change — aka Expand Contract Pattern — helped us to deliver the new feature without disturbing the existing functionalities. We moved to the new library over a period.

Expand Contract pattern can be applied to databases too. I’d written about the Split table database refactoring technique.

Our product — Good Karma — has a trial class booking module, to allow users to book trial classes at yoga studios. Not everyone who books a trial class attends the same. And those who attend may or may not decide to register with the yoga studio as a member. So this means the status of a booking can be as follows:

We started with the above, and later realised that we need to split the status field into two:

Let’s see how approached the same using the split column refactoring:

We’ve got a few entry points in the application using which the status can be updated. So we first rolled out the migration [like a dark launching]. This meant migrating the data to the new fields and also added a trigger to save the data to the new fields when the status field is updated.

After launching the migration, we updated the related parts of the system to reflect the new schema. Once we gained enough confidence about the new schema, we dropped the status column. So, in summary, we expanded it, and then later contracted it to the new schema.

Expand Contract Pattern

Add a comment

Related posts:

The Stereotype

Being raised in the untied states of america you are always told that this is the land of the free and, the home of the brave. That the american dream is easily accomplished by hard work and…