Chapter 21 · Part 4

Expand-Contract Pattern

A focused chapter on expand-contract pattern, with practical delivery concerns, trade-offs, and the operational questions behind CI/CD work.

21-1

Why You Can't Just Delete That Database Column

Your team just finished updating the application code to use the new database schema. The old column looks like dead weight. You want to clean it up. So

6 min
21-2

Adding New Database Structures Without Breaking Running Applications

You have a users table with a fullname column. The product team wants to split names into firstname and lastname for better personalization. You need to

5 min
21-3

When Two App Versions Share One Database: The Dual-Write and Dual-Read Transition

Picture this: your team has just added a new column to a production database table. The schema change went smoothly. Now you need to deploy the new

7 min
21-4

When Old Data Meets New Schema: Backfilling and Verifying Legacy Records

You have just added a new column to a database table that has been running in production for three years. The application now writes to both the old and

6 min
21-5

When Your Database Migration Needs a Clean Break: The Cutover Phase

Imagine this scenario: your team has spent weeks carefully migrating data from an old database schema to a new one. The expand-contract pattern has been

5 min
21-6

When Can You Safely Delete Old Database Columns? The Contract Phase of Expand-Contract

You have migrated all your application code to use the new column format. The deployment went smoothly. No errors in the logs. Your team is ready to clean

5 min
21-7

Renaming Columns, Splitting Tables, and Changing Constraints Without Downtime

You have a users table with a column called fullname. The team decides it should be displayname instead. If you rename it directly, every application

6 min