-
Notifications
You must be signed in to change notification settings - Fork 136
Add --schema option to river migrate-get + hide schema comments otherwise
#903
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
Merged
Conversation
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
brandur
added a commit
that referenced
this pull request
May 17, 2025
…therwise Here, add a `--schema` option to the `river migrate-get` command that lets the caller inject a custom schema into the SQL generated by the command. If the `--schema` command is not provided, we hide the `/* TEMPLATE: schema */` comments for cleanliness (previously, they were returned, which wasn't harmful but added visual noise). Only tangentially related, fix a small bug in the migration "flags" that are output like `-- River main migration 001 [up]` in that when using the default "main" line, the line was being accidentally omitted. Also unrelated, but add missing docs for `river migrate-list` which have apparently accidentally been a TODO for quite some time. Fixes #903.
a943d9e to
be12a95
Compare
be12a95 to
5d32433
Compare
brandur
commented
May 17, 2025
| // Don't log if this is part of a standard shutdown. | ||
| if !errors.Is(context.Cause(ctx), startstop.ErrStop) { | ||
| p.Logger.ErrorContext(ctx, p.Name+": Error fetching queue settings", slog.String("err", err.Error())) | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what happened here. My linter is suddenly picking these up, but it seems like it should've picked them up before. I left the changes in though because they look right and I'm sure the linter will want to put them in another PR if not this one.
Contributor
Author
|
@bgentry Seem okay? |
5d32433 to
f62402b
Compare
bgentry
approved these changes
May 17, 2025
…therwise Here, add a `--schema` option to the `river migrate-get` command that lets the caller inject a custom schema into the SQL generated by the command. If the `--schema` command is not provided, we hide the `/* TEMPLATE: schema */` comments for cleanliness (previously, they were returned, which wasn't harmful but added visual noise). Since we're making changes anyway, add a test suite for `migrate-get`. It should've been there before anyway and it will help protect against regressions. Only tangentially related, fix a small bug in the migration "flags" that are output like `-- River main migration 001 [up]` in that when using the default "main" line, the line was being accidentally omitted. Also unrelated, but add missing docs for `river migrate-list` which have apparently accidentally been a TODO for quite some time. Fixes #902.
f62402b to
821fcec
Compare
Contributor
Author
|
thx. |
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.
Here, add a
--schemaoption to theriver migrate-getcommand thatlets the caller inject a custom schema into the SQL generated by the
command. If the
--schemacommand is not provided, we hide the/* TEMPLATE: schema */comments for cleanliness (previously, they werereturned, which wasn't harmful but added visual noise).
Since we're making changes anyway, add a test suite for
migrate-get.It should've been there before anyway and it will help protect against
regressions.
Only tangentially related, fix a small bug in the migration "flags" that
are output like
-- River main migration 001 [up]in that when usingthe default "main" line, the line was being accidentally omitted.
Also unrelated, but add missing docs for
river migrate-listwhich haveapparently accidentally been a TODO for quite some time.
Fixes #902.