Migrations are version-controlled definitions of database schema changes.
Example:
Schema::create('products', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->decimal('price', 10, 2);
$table->timestamps();
});
Commands:
php artisan make:migration create_products_table
php artisan migrate
Migrations allow a development team to reproduce schema changes consistently across environments.
Scenario:
When a team adds a sku column, the migration becomes part of source control and can be applied to development, staging, and production according to the deployment process.