Merged
Conversation
Contributor
Author
|
anything I could do to help move this forward? |
Contributor
|
Interesting. I agree, status should be R/O, there is no need for it to create a table |
Enrico204
reviewed
Jan 27, 2022
fe7a0ad to
ff329c8
Compare
Owner
|
Would be good to add a test making sure the table doesn’t get created before we merge |
Contributor
Author
Done! 7c76b9b |
Owner
|
Thanks! |
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.
So we have this use case where our developers have read-only access to our databases, and want to be able to run
dbmate statusbefore running a migration as part of our CI/CD pipeline.Surprisingly,
dbmate statushas the potential side-effect of creating the migrations table if it's not there, which fails for a read only user.This change makes the Status command read only by checking if the table exists, and returning all migrations as pending if it doesn't (and works as expected otherwise).