-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Use migrate:fresh in DatabaseMigrations #20090
Conversation
This is busting my non Dusk feature tests when I run the full suite. The error I get is:
Switching back to |
sounds like it's unable to drop the existing database. maybe a permissions issue? |
This is being run in memory. Excerpt from my
and my sqlite connection:
|
Are you sure this is the problem? Because I was trying to think how it can be possible... The 'fresh' part of the command does not attempt to create a table. And if you're running sqlite/:memory:, there is nothing to drop either, so it will run through. The 'migrate' part is exactly what we had before, it calls the same command. If it works with migrate, it has to work with migrate:fresh because they're the same command, right? Your error says you are trying to create a table 'migrations' when one already exists. I can only guess here, but maybe you have somewhere in your tests an attempt to create a migrations table? I also tried some tests on sqlite/:memory: settings in phpunit and it was running as expected here. |
What is the purpose of rolling back the migrations (in beforeApplicationDestroyed) now that we drop all the tables in the next run? |
#20089