Skip to content

Migration

Easy — everyone uses thisDatabase

ELI5 — The Vibe Check

A migration is a versioned script that modifies your database schema — adding a column, creating a table, changing a type. Migrations are like git commits for your database. You can run them in order or roll them back.

Real Talk

A database migration is a versioned, incremental change to a database schema managed through code. Migration tools (Flyway, Liquibase, Knex, Prisma, Rails, Django) track which migrations have been applied and allow controlled schema evolution across environments. Each migration has an up (apply) and optionally a down (rollback) function.

Show Me The Code

-- Migration: add phone_number column
ALTER TABLE users ADD COLUMN phone_number TEXT;

-- Rollback:
ALTER TABLE users DROP COLUMN phone_number;

When You'll Hear This

"Create a migration to add the phone_number column." / "Never edit a migration that has already been run in production — create a new one."

Made with passive-aggressive love by manoga.digital. Powered by Claude.