juniorLaravel

What are migrations in Laravel?

Updated May 16, 2026

Short answer

Migrations are version control for database schema.

Deep explanation

Migrations allow developers to define and modify database structure using PHP code instead of SQL. They support versioning and rollback.

Real-world example

Used when evolving database schema in team projects.

Common mistakes

  • Editing old migrations instead of creating new ones.

Follow-up questions

  • What is rollback?
  • Why use migrations?

More Laravel interview questions

View all →