Glossary Term Databases

Migration

A versioned script that changes your database structure or transforms stored data in a repeatable way.

#data #backend #database

When this matters

Migrations matter the first time you add a new column, rename a table, introduce a relation, or move data from one format to another. If your app has local, staging, and production environments, they matter even more because all three need the same change history.

Small example

A migration might add a new `role` column for users and backfill a default value so existing rows still work.

ALTER TABLE users
ADD COLUMN role TEXT NOT NULL DEFAULT 'member';

Common mistake or lookout

Editing the database manually in one environment and forgetting to codify the change. That leaves your schema out of sync, which is how “works on my machine” mutates into “why did production explode?”

Why this matters for vibe coders

Vibe coders often iterate on the data model after the UI already works. Migrations are what let you keep that momentum without turning your production database into an archaeological dig.