mirror of
https://github.com/xataio/pgroll.git
synced 2024-10-05 17:47:59 +03:00
200529d5a3
Allow columns with `CHECK` constraints in `create_table` operations: ```json { "name": "25_add_table_with_check_constraint", "operations": [ { "create_table": { "name": "people", "columns": [ { "name": "id", "type": "integer", "pk": true }, { "name": "name", "type": "varchar(255)", "check": { "name": "name_length", "constraint": "length(name) > 3" } } ] } } ] } ```
26 lines
489 B
JSON
26 lines
489 B
JSON
{
|
|
"name": "25_add_table_with_check_constraint",
|
|
"operations": [
|
|
{
|
|
"create_table": {
|
|
"name": "people",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"pk": true
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"check": {
|
|
"name": "name_length",
|
|
"constraint": "length(name) > 3"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|