Dev iconDevSep 22, 2026 ~1 min source read

Testing Risky Postgres Migrations Safely with Volume Cloning on Unikraft Cloud

This post deliberately uses the other, broadly available mechanism instead вЂ" cloning the database's persistent volume and booting a fresh Postgres instance against the clone вЂ" which works on the hosted platform today and needs no special license. Database migrations can pass every check in development and still take production down, and the classic example is adding a NOT NULL column with no default to a table that already has rows.

Testing Risky Postgres Migrations Safely with Volume Cloning on Unikraft Cloud

Share this story

Send the public story page.

Useful takeaways from this story.

Database migrations can pass every check in development and still take production down, and the classic example is adding a NOT NULL column with no default to a table that already has rows.

It works fine against an empty dev database and fails instantly against real data, which is the one place you cannot afford to find that out.

It is currently limited to enterprise customers and requires a license that includes branching.

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

Database migrations can pass every check in development and still take production down, and the classic example is adding a NOT NULL column with no default to a table that already has rows. It works fine against an empty dev database and fails instantly against real data, which is the one place you cannot afford to find that out. It is currently limited to enterprise customers and requires a license that includes branching.

How it works

  • This guide builds a real multi-tenant API backed by PostgreSQL on Unikraft Cloud, then clones the live database's persistent volume, runs that exact failure against a real copy, and only promotes the fix...
  • This post deliberately uses the other, broadly available mechanism instead вЂ" cloning the database's persistent volume and booting a fresh Postgres instance against the clone вЂ" which works on the hosted...

Example or evidence

  • Go 1.25 or later Docker with BuildKit enabled The Unikraft CLI, with unikraft login completed, and a Unikraft Cloud account psql installed locally for verification github.com/jackc/pgx/v5 and...

Details worth keeping

When you read "clone" below, that is what it means.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app