Skip to main content
PreparationZone Logo
PreparationZone
Back to Fundamentals

Fundamentals · Medium · Free

What is a schema migration? Why version database changes?

FresherFundamentalsDatabase Fundamentals
Model answer

Schema migrations

Versioned SQL/DDL scripts (Flyway, Liquibase) applied in order—reproducible environments and roll-forward plans.

sql
-- V2__add_email_index.sql
CREATE INDEX CONCURRENTLY idx_users_email ON users(email);
Never hand-edit prod schema without migration file in git.