Laravel Migrations

Laravel needs an empty database created either through command line or PHPMySQL.

Check .env file that MySQL database name matches with correct username and password.

Open terminal and type:

php artisan migrate

The information for these tables are kept in the database/migrations folder.

Here is a list of all types of migrations that can be done:

  migrate:fresh          Drop all tables and re-run all migrations
  migrate:install        Create the migration repository
  migrate:refresh        Reset and re-run all migrations
  migrate:reset          Rollback all database migrations
  migrate:rollback       Rollback the last database migration
  migrate:status         Show the status of each migration

Leave a Reply

Your email address will not be published. Required fields are marked *