feat(doctor): create a missing database from the finding - #1492
Open
geodro wants to merge 1 commit into
Open
Conversation
A site pointing at a MySQL or Postgres schema its engine does not hold was told to go and run lerd db:create, the one finding on the panel ending in a command to type somewhere else, and the button it did carry ran the framework's migrate command, which has nowhere to run until the database exists. The finding creates the database now, from the dashboard and from lerd site:doctor --fix alike. Creating a schema happens in the engine's container rather than the site's, so it runs as a host action beside installing a service the site declares, and it resolves the missing set again on the way in so it can only ever create what the check reported. A database that does not exist already suppresses the framework migration check, so the migrate button returns on the re-check that follows and the two steps stay in the order they have to happen in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A site pointing at a MySQL or Postgres schema its engine does not hold was told to go and run lerd db:create, which made it the one finding on the doctor panel ending in a command to type somewhere else. The button it did carry ran the framework's migrate command, and that could never resolve it: migrations have nowhere to run until the database exists, so pressing it failed against the very thing the finding was about.
The finding creates the database now, from the dashboard and from lerd site:doctor --fix alike. Creating a schema happens in the engine's container rather than the site's, so it runs as a host action beside installing a service the site declares, and it resolves the missing set again on the way in so it can only ever create what the check reported, stopping at the first refusal rather than reporting a half done run as done. An engine that cannot be reached still produces no finding and no work.
A database that does not exist already suppresses the framework migration check, so the migrate button returns on the re-check that follows and the two steps stay in the order they have to happen in. The SQLite sibling is untouched: an absent or empty file is exactly what migrations do create.
Closes #1491