graphql-engine/server/testcases/alter_column_default.json
2018-06-28 00:32:00 +05:30

53 lines
1.2 KiB
JSON

{
"description": "alter defaults test",
"depends": [],
"items": [
{
"name": "alter_column_default",
"url": "/api/1/query",
"role": "admin",
"status_code": 200,
"method": "POST",
"user_id": "1",
"request": {
"kind": "create_table",
"body":
{
"primary_key": [
"id"
],
"name": "a",
"columns": [
{
"type": "serial",
"name": "id"
},
{
"type": "timetz",
"name": "ts_sql",
"default_sql": "now()"
}
]
}
}
},
{
"name": "create_schema",
"url": "/api/1/query",
"role": "admin",
"status_code": 400,
"response": {"path":"$","error":"Expecting ISO8601 formatted time"},
"method": "POST",
"user_id": "1",
"request": {
"kind": "alter_column_default",
"body":
{
"table": "a",
"new_default": "now()",
"column": "ts_sql"
}
}
}
]
}