-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add a 'set comment' sub-operation to 'alter column' #344
Merged
Conversation
This file contains 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
andrew-farries
force-pushed
the
add-alter-column-comment-sub-op
branch
from
April 23, 2024 08:46
f7406cd
to
8f800e2
Compare
andrew-farries
changed the base branch from
main
to
allow-setting-comment-to-null
April 23, 2024 08:46
andrew-farries
force-pushed
the
add-alter-column-comment-sub-op
branch
from
April 24, 2024 10:10
8f800e2
to
2780150
Compare
andrew-farries
changed the base branch from
allow-setting-comment-to-null
to
add-alter-column-default-sub-op
April 24, 2024 10:10
andrew-farries
force-pushed
the
add-alter-column-comment-sub-op
branch
2 times, most recently
from
April 24, 2024 10:30
cf7bf3c
to
722b92f
Compare
andrew-farries
force-pushed
the
add-alter-column-comment-sub-op
branch
from
April 25, 2024 10:48
722b92f
to
0a02c05
Compare
exekias
approved these changes
Apr 29, 2024
andrew-farries
added a commit
that referenced
this pull request
Apr 29, 2024
Build on #344 to allow removing column comments by setting them to `null`. Make use of omissis/go-jsonschema#220 and use the [nullable](https://github.com/oapi-codegen/nullable) package so that it's possible to distingush between a missing `comment` field and one that is explicitly set to `null`. With omissis/go-jsonschema#220 not being part of a release yet, use a custom build of `go-jsonschema`. It should be possible to switch back to the official release images once omissis/go-jsonschema#220 is part of a release. Without this change it becomes impossible to remove a comment from a column using the 'set comment' 'alter column' sub-operation (#344).
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.
Allow 'alter column' operations to set the comment on a column:
This is a versioned migration so the column to which the comment is applied is duplicated and backfilled according to the
up
anddown
SQL supplied with the 'alter column' operation.up
anddown
default to a simple copy of the field between new and old columns.The intention is that this can be combined with a 'change type' sub-operation if there is some column metadata that should be updated as part of the type change:
Fixes #328