-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration run ordering #243
Comments
Sorry, I was wrong with describing migration run order in initial post, so I've edited it. |
What's the purpose of |
This is the same config for all my repositories (some of them using mysql in tests). To be assure that everything will be migrated from scratch on each run. |
Well, it's not useful and cause issue exactly as you experienced right now. |
|
@crynobone thanks. I've removed all $this->artisan('migrate', ['--database' => 'sqlite'])->run(); Now it seems to work. |
Orchestra v3.8.1
Orchestra runs migration in this order:
database/migrations
vendor/orchestra/testbench-core/laravel/database/migrations
tests/database/migrations
I need to run package tests migrations first of all. How can I do it?
In
TestCase.php
I'm loading package test migrations:In test file there is
RefreshDatabase
trait.Here is an example where I found this issue: laravel-love/add-console-setup-commands. Tests are working good until this case is executed. It creates migration file in application. Next tests will fail because created migration will be runned before package test migrations which contains tables required for this case.
The text was updated successfully, but these errors were encountered: