A file that defines changes to your database structure, like creating or modifying tables.
A migration is a version-controlled file describing a change to your database schema. Instead of manually altering tables, you write SQL in migration files. This makes changes repeatable and safe—you can deploy the same migrations to production and development.
Migrations track the evolution of your Database. Each migration has an up() (apply change) and down() (revert change). Migration tools and ORMs run them in order, maintaining a history. If something breaks, you can revert migrations. This is essential for team development—everyone applies the same changes in the same order.
Migrations can also create database triggers and indexes alongside tables and policies.
We give you the skills to build, deploy, and own a full product. Professional stack, AI co-pilot, no coding background required.