Search

Laravel Artisan Migration Command: The migrate:install Command

December 7, 2016 —John Koster

The migrate:install command is used to create the migrations database table. It defines only one optional parameter database. The database option can be used to specify the database connection to use when running the migrations. By default this option is set to value held in the database.default configuration entry (which is set to mysql by default).

The following example demonstrates how to run the migrate:install command:

1# Install the migrations repository.
2php artisan migrate:install
3 
4# Install the migration while specifying the
5# database connection to use.
6php artisan migrate:install --database=mysql

After the command has executed, a new database table named migrations will have been created with a structure similar to the following:

The migrations table

Some absolutely amazing
people

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.