-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
c/cliRelated to CLIRelated to CLIe/quickfixcan be wrapped up in few hourscan be wrapped up in few hoursk/bugSomething isn't workingSomething isn't workingp/highcandidate for being included in the upcoming sprintcandidate for being included in the upcoming sprint
Description
When executing a down migration using
hasura migrate apply --version 1578025638744 --type down
down.sql is executed before down.yaml
This issue is not there if
hasura migrate apply --down 1
is used.
Error from GraphQL Engine:
{
"type": "http-log",
"timestamp": "2020-01-03T05:09:34.893+0000",
"level": "error",
"detail": {
"operation": {
"user_vars": {
"x-hasura-role": "admin"
},
"error": {
"path": "$.args[2].args",
"error": "table \"table_name_1_rel_name\" does not exist",
"code": "not-exists"
},
"request_id": "b854c55c-1670-4142-a437-3e5d99934c93",
"response_size": 100,
"query": {
"args": [
{
"args": {
"cascade": false,
"check_metadata_consistency": null,
"sql": "DROP TABLE \"public\".\"table_name_1_rel_name\";\nDROP TABLE \"public\".\"table_name_1\";\n",
"read_only": false
},
"version": 1,
"type": "run_sql"
},
{
"args": {
"cascade": false,
"check_metadata_consistency": null,
"sql": "DELETE FROM hdb_catalog.schema_migrations WHERE version = 1578025638744",
"read_only": false
},
"version": 1,
"type": "run_sql"
},
{
"args": {
"role": "metrics",
"table": "table_name_1_rel_name"
},
"version": 1,
"type": "drop_delete_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1_rel_name"
},
"version": 1,
"type": "drop_update_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1_rel_name"
},
"version": 1,
"type": "drop_select_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1_rel_name"
},
"version": 1,
"type": "drop_insert_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1"
},
"version": 1,
"type": "drop_delete_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1"
},
"version": 1,
"type": "drop_update_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1"
},
"version": 1,
"type": "drop_select_permission"
},
{
"args": {
"role": "metrics",
"table": "table_name_1"
},
"version": 1,
"type": "drop_insert_permission"
},
{
"args": {
"relationship": "api_limit",
"table": "table_name_1_rel_name"
},
"version": 1,
"type": "drop_relationship"
},
{
"args": {
"relationship": "rel_name",
"table": "table_name_1"
},
"version": 1,
"type": "drop_relationship"
},
{
"args": {
"table": "table_name_1_rel_name"
},
"version": 1,
"type": "untrack_table"
},
{
"args": {
"table": "table_name_1"
},
"version": 1,
"type": "untrack_table"
},
{
"args": {
"cascade": false,
"check_metadata_consistency": null,
"sql": "DELETE FROM hdb_catalog.schema_migrations WHERE version = 1578025638744",
"read_only": false
},
"version": 1,
"type": "run_sql"
}
],
"version": 1,
"type": "bulk"
}
},
"http_info": {
"status": 400,
"http_version": "HTTP/1.1",
"url": "/v1/query",
"ip": "172.20.0.1",
"method": "POST",
"content_encoding": null
}
}
}Metadata
Metadata
Assignees
Labels
c/cliRelated to CLIRelated to CLIe/quickfixcan be wrapped up in few hourscan be wrapped up in few hoursk/bugSomething isn't workingSomething isn't workingp/highcandidate for being included in the upcoming sprintcandidate for being included in the upcoming sprint