TestForge | Aidevops | 📊 Plogger ✍️ Blog 📚 Docs
plogger

AI DevOps Korea

Turn AI service development and operations into one improvement loop

Aidevops.kr covers LLMOps, RAG, agents, observability, evaluation, and cost-performance optimization for production AI services.

Applying Expand-Contract to Database Schema Changes

· Updated May 9

In production databases, schema changes are often riskier than new feature releases. Even a column rename can affect applications, batch jobs, analytics, and external data pipelines. That is why experienced teams avoid all-at-once migrations and prefer an expand-contract sequence.

What happens in the expand phase

  • add new columns or tables first
  • allow reads from both old and new structures
  • decide whether dual writes are needed
  • separate backfill from verification

The goal is to make the new structure available without breaking the current system.

What happens in the contract phase

  • remove reads from old columns
  • shut down old write paths
  • confirm backfill completion
  • leave a monitoring window before final deletion

Rushing the delete step is how hidden consumers create incidents.

Conclusion

The hard part of schema change is not DDL syntax. It is sequencing. Expand-contract may feel slower, but it greatly reduces rollback pain and production risk.

Continue Reading

Related posts

Next Path

Keep exploring this topic as a system