Rolling Back All Database Migrations


You want to undo all database migrations.

You want a clean database, with no tables in it.


Use the php artisan migrate:reset.

$ php artisan migrate:reset

You can use the --pretend option to see what would happen without affecting any data.

$ php artisan migrate:reset --pretend


This is like calling migrate:rollback over and over again.

In fact, you could repeatedly call php artisan migrate:rollback and there's nothing left to rollback.

The only table left in your database when this command completes is the migrations table and it will be empty.

comments powered by Disqus