mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 14:27:59 +03:00
98 lines
2.0 KiB
JSON
98 lines
2.0 KiB
JSON
{
|
|
"description": "alter column type test",
|
|
"depends": [],
|
|
"items": [
|
|
{
|
|
"name": "create table",
|
|
"url": "/api/1/query",
|
|
"role": "admin",
|
|
"status_code": 200,
|
|
"method": "POST",
|
|
"user_id": "1",
|
|
"request": {
|
|
"kind": "create_table",
|
|
"body": {
|
|
"primary_key": [
|
|
"id"
|
|
],
|
|
"name": "b",
|
|
"columns": [
|
|
{
|
|
"type": "serial",
|
|
"name": "id"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "c"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "create table",
|
|
"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": "integer",
|
|
"name": "b",
|
|
"references": {
|
|
"column": "id",
|
|
"table": "b"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "create obj rel",
|
|
"url": "/api/1/query",
|
|
"role": "admin",
|
|
"status_code": 200,
|
|
"method": "POST",
|
|
"user_id": "1",
|
|
"request": {
|
|
"kind": "create_object_relationship",
|
|
"body": {
|
|
"name": "b_rel",
|
|
"table": "a",
|
|
"using": "b"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "add column",
|
|
"url": "/api/1/query",
|
|
"user_id": "1",
|
|
"role": "admin",
|
|
"status_code": 400,
|
|
"method": "POST",
|
|
"request": {
|
|
"kind": "add_column",
|
|
"body" : {
|
|
"table": "a",
|
|
"column": {
|
|
"name": "b_rel",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |