Create the migrations folder
Instead of putting all of our SQL directly into phpMyAdmin, we'll save it in a migration file. This makes the database setup easier to:
- keep in version control
- share with other developers
- reproduce on another computer
- update later
text
your-project/
│
├── app/
│
├── database/
│ └── migrations/
│
├── public/
│
└── index.php
database/migrations, create:
text
database/
└── migrations/
└── 001_initial_library.sql
001_ prefix tells us that this is the first migration.
As the application grows, additional migrations can follow the same pattern:
text
001_initial_library.sql
002_add_categories.sql
003_add_users.sql
Sign in to save your progress permanently.
Progress is saved in your browser session
Step 4 of 19