Urgent.News

What's breaking now, across thousands of outlets.

Tech

Opinion: Your Tests Can't See What a Migration Destroys — Dry-Run It on a Clone

Opinion: Your Tests Can't See What a Migration Destroys — Dry-Run It on a Clone A green test suite is the wrong tool for judging an AI-generated migration, because tests run against the post-migration schema and never observe the intermediate states where data disappears. The up migration is the visible artifact that gets reviewed, while the down migration is treated as an afterthought even…

In the article "Your Tests Can't See What a Migration Destroys — Dry-Run It on a Clone," the author argues that traditional testing methods are insufficient to verify the safety and integrity of database migrations. A green test suite is inadequate because it only examines the post-migration schema and does not observe the intermediate states where data loss may occur.

The article emphasizes the importance of creating a dry-run workflow using a clone of the production schema with a representative data sample. This clone should undergo both the up and down migrations, with data integrity checks performed at each step. The three key structural metrics to monitor are table count, constraint count, and not-null attribute count.

While these metrics can catch most destructive migration patterns, they may not be sufficient for detecting data corruption. Additional checks such as per-table row counts, column null rates, duplicate detection, and foreign key integrity should also be performed. The article concludes that a migration should be reversible, proving that it can be safely undone, even if it doesn't pass all tests.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

mcp-drift-monitor: continuous detection of unauthorized changes in MCP servers

mcp-drift-monitor detecta cambios no autorizados en servidores MCP (Model Context Protocol). Implementa el control primario faltante descrito en arXiv:2608.00997 : un barrido completo periódico del…

  • mcp-drift-monitor monitors unauthorized changes in MCP servers
  • Based on arXiv paper arXiv:2608.00997 for primary control
  • Periodic full scan detects silent changes and new additions

How to Make an HTML5 Game (Browser Loop, 2026)

Originally published on the Sorceress blog . TL;DR: an HTML5 game is four things — an index.html host page, a JS module that owns the loop, a folder of sprites and audio, and a static zip anyone can…

More from Sunday 23 August →