Learn what migrations are and how to create them.

We'll cover the following

Migrations are used to define the database schema. They provide a blueprint of the database structures that we want to use. We can track and share database mutations so that our teammates no longer have to find the database dump files to update their database.

Creating migrations

Migration files are created in the database/migrations folder. We will create a products table with the help of migrations. The table will contain the following fields:

id name price created_datetime updated_datetime

Get hands-on with 1200+ tech skills courses.