Glossary · Database
Migration
A version-controlled change to a database schema, such as adding tables, columns, or modifying constraints.
Database migration refers to the process of making structured, version-controlled changes to a database schema. Migrations are typically written as code (SQL or ORM-specific syntax) and applied sequentially, allowing teams to evolve their database schema alongside application code. Each migration has an "up" function (applies the change) and a "down" function (reverts it). Migration tools track which migrations have been applied, ensuring consistency across development, staging, and production environments. Popular migration tools include Flyway, Liquibase, Prisma Migrate, Knex.js, and built-in ORM migration systems in frameworks like Django and Rails.
In practice
How AI for Database applies it
Fig — every answer ships with the tables, rows and SQL behind it.
See it on your own database
Connect read-only in minutes. Free models included.