1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-22 06:51:32 +03:00
graphql-engine/server/testcases/alter_column_default.json

53 lines
1.2 KiB
JSON
Raw Normal View History

2018-06-27 16:11:32 +03:00
{
"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"
}
}
}
]
}