hasura / hasura/graphql-engine

Migrations and metadata tutorial provides incorrect information

Open
#7,539 4 comments 1 reaction 0 assignees View on GitHub
c/docs c/migrations
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.0.9
CLI Version (for CLI related issue): v2.0.8

### Environment

Running hasura in a docker container based as per documentation
https://hasura.io/docs/latest/graphql/core/getting-started/docker-simple.html#step-1-get-the-docker-compose-file

### What is the expected behaviour?

I expect that following steps in migration tutorial will provision a database with a desired schema and graphql-engine.

### Keywords

- database default is not connected to hasura
- database not found
-
### What is the current behaviour?

### How to reproduce the issue?

1. Start hasura in docker container as per https://hasura.io/docs/latest/graphql/core/getting-started/docker-simple.html#step-1-get-the-docker-compose-file

2. Run following set of commands

```sh
hasura init hasura
cd hasura
hasura migrate create init --sql-from-file ../database_v2/artifacts/provision.sql --database-name default
#> WARN database default is not connected to hasura
#> INFO Migrations files created name=init version=1631292489116
hasura migrate apply --database-name default
#> FATA[0001] database not found: error determining database kind for default, check if database exists on hasura
```

### Any possible solutions?

Update documentation so all the steps are included and can be used to get started.

### Can you identify the location in the source code where the problem exists?

I do not know the code base to be able to tell. As far as I can tell problem is that image starts without any database source and all my attempts to identify a way to start image with connected database source have failed. Here is the related issue #7538

### If the bug is confirmed, would you be willing to submit a PR?

At the moment I do not know how to fix this, assuming I do understand how and have necessary skills I would.

Contributor guide

Open the contributing guide

Research direction

Start with the migration tutorial linked from the Docker getting-started page and reproduce the documented commands: `hasura init`, `hasura migrate create`, and `hasura migrate apply`. Compare those steps with the database setup expected by the Docker deployment and related issue #7538. Done means the tutorial includes all required setup steps and its commands provision the intended schema without the database-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
cli, database, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.