Skip to content
Wade Womersley

wade.one

wade womersley – york based software engineer

  • Home
  • 2026
  • October
  • 20
  • Database Migrations Need to Survive Two App Versions at Once

Database Migrations Need to Survive Two App Versions at Once

Posted on October 20, 2026 By
Programming

A database migration can work perfectly on your development machine and still make a production deployment awkward. During a rolling release, some application instances may be running the old code while others use the new code. If the schema change immediately removes something the old version expects, the deployment order becomes a trap.

The expand-and-contract approach separates adding the new structure from removing the old one. Introduce a compatible shape, move the application and data across, then remove the obsolete structure when it is genuinely unused. It creates more than one step, but each step has a clearer relationship with the code currently running.

I would pay particular attention to data written during the transition. A backfill of yesterday’s rows does not automatically handle today’s new writes, and a rollback may be useless if the older application cannot understand the updated records. Decide how those cases work before treating a successful migration command as proof that the release is safe.

Small deployments are easier to manage when the database lets the application move gradually. The aim is a change you can explain and recover from, with checks at each boundary. Saving one migration file is not worth making every instance switch versions at exactly the same moment.

Share:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit

Related

Comments

comments

Tags: database-migrations deployments prisma

Post navigation

❮ Previous Post: Every Mundane Task Deserves an Overdramatic Soundtrack
Next Post: Hashed Asset Names Make CDN Releases Easier to Reason About ❯

You may also like

Programming
Using Amazon EC2 with C# .net
October 15, 2012
AI
ChatGPT 5.5 and Codex Feel Like a Real Step Up
April 24, 2026
Programming
Verify Webhook Signatures Before Parsing Away the Evidence
October 27, 2026
Programming
PHP5.4.3 Available on Dotdeb.org (Installs fine on Ubuntu)
May 22, 2012
  • AI
  • artificial intelligence
  • Ego-centric
  • Events
  • Films
  • Food
  • Gaming
  • Gym
  • Hardware
  • Holidays
  • News
  • PHP
  • Programming
  • Random Stuff
  • Reviews
  • Science
  • SEO
  • Software
  • Software Engineer
  • Support
  • Uncategorized
  • Work

Categories

  • AI
  • artificial intelligence
  • Ego-centric
  • Events
  • Films
  • Food
  • Gaming
  • Gym
  • Hardware
  • Holidays
  • News
  • PHP
  • Programming
  • Random Stuff
  • Reviews
  • Science
  • SEO
  • Software
  • Software Engineer
  • Support
  • Uncategorized
  • Work

Archives

  • November 2026
  • October 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • August 2023
  • April 2023
  • March 2023
  • April 2016
  • October 2015
  • July 2015
  • June 2015
  • May 2015
  • March 2015
  • February 2015
  • January 2015
  • October 2014
  • December 2013
  • September 2013
  • June 2013
  • October 2012
  • May 2012
  • March 2012
  • February 2012
  • April 2011
  • March 2011
  • October 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009

Copyright © 2026 wade.one.

Theme: Oceanly News Dark by ScriptsTown