Fix install errors when using SQLite. #3980
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working on making Tome compatible with Drupal Console, I noticed that re-installing with SQLite was quite difficult. If I ran:
Re-installs wouldn't work as there was already a database. I saw that there was special logic for deleting the SQLite file, but when I ran:
It only worked every other execution - I think because the SQLite database is re-created every time a query is made.
To me the most clear behavior would be that
drupal site:install standard --force --no-interaction
just works for SQLite, and this PR fixes that by:settings.php
when using--no-interaction
. Currently if you already have database connection info defined it will use that instead of the--db-*
options, but this only happens in interactive mode. Moving the logic block seems like a sane fix.