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.
Related tool or page
Related glossary terms
SQL
SQL is how you ask a relational database for exactly the rows you want, change stored data, or define tables and relationships.
Shared tags: data, backend, database
Database
A structured place to store and query data.
Shared tags: data, backend
Index
A data structure that speeds up lookups.
Shared tags: data, backend
