mirror of
https://github.com/zhigang1992/graphql-engine.git
synced 2026-06-14 09:39:09 +08:00
49 lines
1.0 KiB
JSON
49 lines
1.0 KiB
JSON
|
|
{
|
|
"description": "add column test",
|
|
"depends": [
|
|
"permission.json"
|
|
],
|
|
"items": [
|
|
{
|
|
"name": "add column",
|
|
"url": "/api/1/query",
|
|
"user_id": "1",
|
|
"role": "admin",
|
|
"status_code": 200,
|
|
"method": "POST",
|
|
"sql_check": [
|
|
"SELECT 1 where EXISTS (select * from information_schema.columns where table_name = 'author' AND column_name='age')"
|
|
],
|
|
"request": {
|
|
"kind": "add_column",
|
|
"body" : {
|
|
"table": "author",
|
|
"column": {
|
|
"name": "age",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "add column",
|
|
"url": "/api/1/query",
|
|
"user_id": "1",
|
|
"role": "admin",
|
|
"status_code": 400,
|
|
"method": "POST",
|
|
"request": {
|
|
"kind": "add_column",
|
|
"body" : {
|
|
"table": "author",
|
|
"column": {
|
|
"name": "id",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
]
|
|
} |