A new migration command.
In Laravel 5.5, we’re introducing a new
migrate:fresh command. If you have used Laravel before, you may already be familiar with the
migrate:refresh command. The
refresh command rolls back all of your migrations and then re-applies them, essentially allowing you to quickly re-build your entire database, which is beneficial during early development when you are still modifying existing migrations.
migrate:fresh command is very similar to
refresh; however, instead of rolling back your migrations via the
down method of each migration, the
fresh command simply drops all tables in your database and then re-applies your migrations. This new command is a wonderful addition for developers who do not write
down migration methods or who have gotten their local databases into a broken state and just want to drop everything and re-build from scratch.
I would like to extend a special thanks to Laurence Ioannou who made the initial PR to provide the foundation for this command as well as Freek Van der Herten who maintains a package that provides this functionality as an add-on to Laravel 5.4 applications. ♥️