hasura / hasura/graphql-engine
Auto-apply migrations/metadata version breaks the app for cli-migrations-v3
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version:
CLI Version (for CLI related issue): hasura/graphql-engine:v2.33.2.cli-migrations-v3
### Environment
### What is the current behaviour?
I am trying to auto-apply migrations/metadata , so when a new PR is open it will set a new postgresql db for the app and then the migration should run before start the server
here is the code I'm trying for the Dockerfile
```
COPY hasura/metadata /hasura-metadata
COPY hasura/migrations /hasura-migrations
CMD graphql-engine \
--metadata-database-url $HASURA_GRAPHQL_METADATA_DATABASE_URL \
serve
```
But when i start function not migration. If i remove **COPY hasura/metadata /hasura-metadata** migrations migrate function into database success. I don't know why.
When i research it same issue
https://github.com/hasura/graphql-engine/issues/5172
but when i add
HASURA_GRAPHQL_CLI_ENVIRONMENT=default
It not resolve for me. Please help?
Contributor guide
Research direction
Start with the Dockerfile command and the copied /hasura-metadata and /hasura-migrations directories, then review the referenced issue #5172 and the HASURA_GRAPHQL_CLI_ENVIRONMENT setting. Reproduce the behavior with cli-migrations-v3 and compare startup with and without the metadata copy; done means the migration behavior and required configuration are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, graphql, postgresql
- Domain
- database, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100