mirror of
https://github.com/xataio/pgroll.git
synced 2024-10-05 17:47:59 +03:00
4f0a715613
Build on #344 to allow removing column comments by setting them to `null`. Make use of https://github.com/omissis/go-jsonschema/pull/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 https://github.com/omissis/go-jsonschema/pull/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 https://github.com/omissis/go-jsonschema/pull/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 (https://github.com/xataio/pgroll/pull/344).
15 lines
247 B
JSON
15 lines
247 B
JSON
{
|
|
"name": "36_set_comment_to_null",
|
|
"operations": [
|
|
{
|
|
"alter_column": {
|
|
"table": "events",
|
|
"column": "event_name",
|
|
"comment": null,
|
|
"up": "event_name",
|
|
"down": "event_name"
|
|
}
|
|
}
|
|
]
|
|
}
|