Skip to content

Topic

Database Schema Migrations

Versioned, reviewed scripts that incrementally change a database's table structure, used as the controlled alternative to automatic schema sync at startup.

Current stories

buildOne report1 publisher

Laravel's one-line foreign key migration stalls writes on two Postgres tables

Postgres locks both tables with SHARE ROW EXCLUSIVE when a migration adds a foreign key, blocking writes until every child row is scanned. A dev.to guide on Laravel migrations splits the change into two statements so the slow scan stops holding up the app's writes.

Publishers:dev.to

Reality

Evidence45
Adoption
Insufficient
Hype gap+15
Incentives
Insufficient
Confidence50
buildOne report1 publisher

SvelteKit starter kits' boot-time migrations race once a second replica starts

Many SvelteKit starter kits run Drizzle migrations on every boot, a default that turns into a race once two replicas start at the same moment. A dev.to post moves the writes into one explicit step before traffic and keeps the boot call as a backstop.

Publishers:dev.to

Reality

Evidence35
Adoption
Insufficient
Hype gap+5
Incentives
Insufficient
Confidence45
buildOne report1 publisher

Drizzle's generated SQL migrations keep the audit trail that push skips

One developer shipping Drizzle ORM on two SvelteKit kits keeps drizzle-kit push in prototyping because it writes no migration history. Production gets generated SQL that is read before it runs, plus a boot-time migrate that multiple replicas can race.

Publishers:dev.to

Reality

Evidence40
Adoption
Insufficient
Hype gap0
Incentives
Insufficient
Confidence45
buildOne report1 publisher

NocoBase's 2.2.14 upgrade adds 44 columns, 42 of them in four new tables

One NocoBase user diffed a 2.1.39-to-2.2.14 upgrade on PostgreSQL 16 and found 44 new columns, only two of them on existing tables. The same test shows admin-built pages live in flowModels, so any upgrade check has to hash that table's JSON before and after.

Publishers:dev.to

Reality

Evidence62
Adoption
Insufficient
Hype gap+10
Incentives
Insufficient
Confidence55