pgroll/examples/26_add_column_with_check_constraint.json
Andrew Farries 947b239b05
Allow columns with CHECK constraints on add column operations (#109)
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"
          }
        }
      }
    }
  ]
}
```
2023-09-20 09:52:22 +01:00

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"
}
}
}
}
]
}