Ever tried updating a live app while users are clicking around, adding stuff to carts, or signing up?

Yeah, moving fast is great, until you need to migrate a database.

This post is all about making that process less painful.

🎯 Migration Gameplans (aka "How do we get from A to B?")

Moving your systems around like apps, data, or full-on infrastructure, can feel like relocating a house while people still live in it.

There are a few popular strategies depending on how much effort you want to put in and how much you want to reinvent:

  • Lift & Shift (Rehost): Basically copy-paste your stuff into the new place. Fast, cheap, not always pretty.
  • Light Makeover (Replatform): While you’re moving, fix a few things so they work better in the new setup.
  • Full Renovation (Refactor): Rethink your app to really take advantage of the new environment.
  • Just Buy New (Repurchase): Scrap the old, get something modern that does the job better.
  • Leave It Be (Retain): Some things are better left untouched, for now.
  • Time to Say Goodbye (Retire): Old services that no one uses anymore? Let them rest in peace.

🚧 Why Databases Are Always That One Drama Queen in Your CI/CD Pipeline

Automating deploys? Awesome.

But databases have a habit of slamming the brakes.

Unlike app code, databases don’t love change.

There’s data in there.

Live data. Possibly a lot.

And messing with it mid-deploy? Risky business.

Here’s what makes databases such high-maintenance:

  • Changing the data structure often means touching actual data.
  • Rolling back isn’t always possible.
  • Testing changes properly requires production-like datasets.

So yeah, updating databases regularly—especially with CI/CD—is like tightrope walking over a lava pit.

Strategies to Survive Frequent DB Changes

1. Backwards-Compatible Changes Are Your New BFF

Think of your schema as an API. Don’t break your consumers.

  • Adding a column? Cool. Just make sure old apps can ignore it.
  • Dropping a column? First, stop writing to it. Then stop reading it. Then drop it later when no one’s watching.

That way, you can ship changes without making everything else panic.

Image description

2. Don't Share Your Database Like a Communal Toothbrush

One app, one schema (or even one database). That’s the dream.

Shared DBs mean tight coupling.

If multiple services are poking at the same tables, updating that schema is like negotiating peace between rival nations.

Split things vertically:

  • UI + business logic + DB per service
  • Now you can deploy one without a domino effect.

Microservices nailed this. Monoliths, take notes.

3. Schema Update + Data Migration = Plan It Like a Heist

Let’s say your new app needs an extra column.

You can’t just deploy it. You need to:

  • First, add the column to your production DB.
  • Then, migrate old data to use it (if needed).
  • Finally, deploy the new version of the app that uses this column.

Sounds easy? Now try it with no downtime allowed 😅

🛠 Tools to Make It Bearable

For relational databases, don’t do this stuff by hand.

Use migration tools like:

They track which migrations have run and apply the ones that haven’t.

No guesswork. Just ship a new script and it handles the rest.

Image description

🧩 High-Availability Makes Everything More Complicated

You’ve got users online 24/7.

You can’t just shut things down for a deploy.

That’s where strategies like Blue/Green Deployments come in.

Picture this:

  • You’ve got two app instances: Blue and Green.
  • Blue is live.
  • You deploy changes to Green.
  • Flip the traffic over once it’s ready.
  • Everyone's happy.

But wait—the DB is shared. You still need to make schema changes in a safe, staged way:

  1. Make changes optional.
  2. Deploy app versions that can handle both old and new.
  3. Migrate the data.
  4. Retire the old way.

Yes, it’s a dance. Yes, it’s annoying.

But that’s the price of no downtime.

Shipping fast and safely is hard.

But with some prep and good habits, you can get your app and your data working together instead of fighting during every deploy.

Let the deployments roll ✌️


I’ve been actively working on a super-convenient tool called LiveAPI.

LiveAPI helps you get all your backend APIs documented in a few minutes

With LiveAPI, you can quickly generate interactive API documentation that allows users to execute APIs directly from the browser.

image

If you’re tired of manually creating docs for your APIs, this tool might just make your life easier.