johnnncodes / laravelsnippets

LaravelSnippets.com website | A repository of useful code snippets for Laravel PHP framework. Submit, grab and share!
http://laravelsnippets.com/
335 stars 97 forks source link

Proposal: Use a "soft" drop in migrations #66

Closed billmn closed 5 years ago

billmn commented 10 years ago

Now TestCase run on startup:

Artisan::call('migrate:reset');
Artisan::call('migrate');

This require to execute migrations on testing database previously because migrate:reset can not find some table (e.g. "migrations")

What about use Schema::dropIfExists instead of Schema::drop in all migrations? This allow to remove the 2° step in https://github.com/basco-johnkevin/laravelsnippets#running-the-tests