mirror of
https://github.com/xataio/pgroll.git
synced 2024-10-06 01:57:32 +03:00
947b239b05
Allow columns with `CHECK` constraints in `add_column` operations: ```json { "name": "26_add_column_with_check_constraint", "operations": [ { "add_column": { "table": "people", "column": { "name": "age", "type": "integer", "default": "18", "check": { "name": "age_check", "constraint": "age >= 18" } } } } ] } ```
20 lines
359 B
JSON
20 lines
359 B
JSON
{
|
|
"name": "26_add_column_with_check_constraint",
|
|
"operations": [
|
|
{
|
|
"add_column": {
|
|
"table": "people",
|
|
"column": {
|
|
"name": "age",
|
|
"type": "integer",
|
|
"default": "18",
|
|
"check": {
|
|
"name": "age_check",
|
|
"constraint": "age >= 18"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|