A new migration command.

Taylor Otwell
Apr 5, 2017 · 1 min read

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.

The new 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. ♥️

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store