Database: Migrations
Introduction
Migrations are like version control for your database, allowing your team to define and share the application's database schema definition. If you have ever had to tell a teammate to manually add a column to their local database schema after pulling in your changes from source control, you've faced the problem that database migrations solve.
Generating Migrations
You may use the migration:create command to generate a database migration.
The new migration will be placed in your databases\migrations directory.
Migration Structure
A migration class contains handle method.
Method is used to add new tables or columns to your database.
Running Migrations
To run of your migration class, execute the migration:run Artisan command:
Running All Migrations
To run all of your outstanding migrations, execute the migration:all Artisan command:
Last updated