-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
SQLite and ResetDatabase trait: deletion of SQL database file fails #783
Comments
Hi @Louisonix are you trying to reset with schema or migrations ? |
Resetting via default mechanism, without any further configuration, so I guess via schema, because that's the default. |
What is the problem you're facing? |
The SQL Database is neiter truncated nor deleted and recreated. No database reset is done. (new Filesystem())->remove($dbPath); is never called.
Then maybe something like:
would relax the condition a bit, so that (new Filesystem())->remove($dbPath); is called like it should. |
the line Isn't the |
Don't know if I understand you correctly. No, that doesn't work, because resetBeforeEachTest quickly returns without action for the first test - probably it's expecting that resetBeforeFirstTest already did the required reset/work. No, not using dama bundle. |
yeah ok I see the problem now, indeed, this condition might be problematic. It was mainly there for performance, but this does not work with sqlite + orm v2 I'll have to remove it or see what was the problem with doctrine/orm v2 |
I'm using the ResetDatabase with Doctrine/SQLite backend.
Because ResetDatabase did not seem to do anything, I found this code to be executed in BaseOrmResetter while debugging:
Remove is never called, because DoctrineOrmVersionGuesser::isOrmV3() returns false.
Code for isOrmV3:
What can I do, to make it work? Is it some kind of bug or is it an configuration error?
The text was updated successfully, but these errors were encountered: