hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.18k stars 2.77k forks source link

better error message on downgrade #4592

Open tirumaraiselvan opened 4 years ago

tirumaraiselvan commented 4 years ago

If I run the downgrade command:

$ docker run -e HASURA_GRAPHQL_DATABASE_URL=$DATABASE_URL hasura/graphql-engine:v1.2.0 graphql-engine downgrade --to-v1.1.1

The response is:

MRMigrated "34"

Two problems here:

  1. The catalog version shows the downgrade-from version and not the downgraded-to version.
  2. The message itself is not useful.
tirumaraiselvan commented 4 years ago

Another error message which needs to be fixed is when you try to downgrade but use a lower version build to execute the downgrade command:

{"path":"$","error":"This downgrade path (from 36 to 34) is not supported, because there is no available migration back to version 11.","code":"not-supported"}
nithindv commented 3 years ago

Also on downgrading to 36 from 40 the log message seems to be inverted? {“type”:“startup”,“timestamp”:“2021-04-07T07:52:01.065+0000",“level”:“info”,“detail”:{“kind”:“catalog_migrate”,“info”:“Successfully migrated from catalog version 36 to version 40.“}} MRMigrated “40”