hasura / hasura/graphql-engine
`hasura migrate apply` exits with exit code 0 when there is a problem with a single migration
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.8.0
CLI Version (for CLI related issue): 2.8.0
### Environment
Windows
### What is the expected behaviour?
I have a faulty up.sql migration file, and I am struggling to get Hasura to fail because of it. Right now my CI passed some code that had invalid up.sql
Instead I would like an exit code of >0
### Keywords
cli, ci
### What is the current behaviour?
### How to reproduce the issue?
1. stop and remove all containers and volumes
2. launch fresh pg+hasura (empty db)
3. run 'hasura migrate apply' and see it applies all the migrations
4. echo $? and see it's 0, but we want 1 here
### Any possible solutions?
If pg says thee SQL has an error, bubble this up to CLI and exit
Contributor guide
Assessment
This issue has not been assessed yet.