Comparing migrate commands0:00
If we run php artisan, in the migrate namespace, you'll see a new one here called migrate-fresh. This is similar to migrate-refresh, but with a small difference. So when you run migrate-refresh, well, in fact, let me just show you. I have a fresh project, so I will run php artisan migrate, and that'll create the two default tables. And if I were to say php artisan migrate-refresh, what that does is it rolls back all of your migrations and then reruns them. However, if we were to do migrate-fresh, it's going to do the same thing, except rather than rolling everything back, it drops every table and starts from scratch. And really, if you think about it, more often than not, this is probably going to be the
Using migrate-fresh benefits0:33
than rolling everything back, it drops every table and starts from scratch. And really, if you think about it, more often than not, this is probably going to be the command that you want to reach for, especially for any longstanding project. You may have run into situations where you try to run a rollback, but maybe there's a little bug or some change that was made that causes the rollback to fail, and you can't get back to start. So this is a nice way to just say drop everything. We're going to start from scratch and then run all of the migrations we have.
