If a teammate adds products.isbn by hand, every other laptop, CI and production drift out of step, and nothing records which ALTER TABLE ran where. A migration is a timestamped PHP file whose up() applies one change and whose down() reverses it. It is committed with the code that needs it, and a migrations table records which files have run, so php artisan migrate applies exactly the files each machine is missing, in filename order.
Design still comes first (Design and Normalization), and migrations compile to Defining Tables's DDL, portably for MySQL 524 , MariaDB 3,681 , PostgreSQL 1,289 , SQLite 4,756 and SQL Server 6 .
| Tool | Stack | Style | License |
|---|---|---|---|
| Laravel 2,157 migrations | Laravel | PHP classes, up and down | MIT |
| Doctrine 159,716 Migrations 3.9 | Symfony 6,093 , Doctrine ORM 159,716 | PHP classes, diff from entities | MIT |
| Flyway 13.7 14,820 | JVM, CLI | Numbered SQL files | Apache 2.0 (Community) |
| Liquibase 5.0 51,363 | JVM, CLI | XML, YAML or SQL changelogs | FSL-1.1 since 5.0 |