pgroll/examples/16_set_nullable.json
Philipp Ucke 80adbaebf6
fix(#132): consistent naming for nullable columns in migration files (#181)
Realated Issue: #132

This PR includes **BREAKING CHANGES**, existing migrations that add a
not null constraint using the `not_null` property will not work anymore.
The migration strategy would be to rename those `not_null` fields in
`alter_column` operations to `nullable`.
2023-10-11 13:14:34 +01:00

15 lines
301 B
JSON

{
"name": "16_set_nullable",
"operations": [
{
"alter_column": {
"table": "reviews",
"column": "review",
"nullable": false,
"up": "(SELECT CASE WHEN review IS NULL THEN product || ' is good' ELSE review END)",
"down": "review"
}
}
]
}