hasura / hasura/graphql-engine
config v3 breaks metadata migration on deployed instances
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
When using the v3 config, running `hasura metadata apply` will apply whatever database that's now hardcoded in the v3 file hierarchy, which overrides the database connection details and produce `Metadata is inconsistent`.
Solution seems to be modifying the `database_url` by adding `from_env` that points to `HASURA_GRAPHQL_DATABASE_URL`.
```yaml
- name: default
kind: postgres
configuration:
connection_info:
database_url:
from_env: HASURA_GRAPHQL_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 600
idle_timeout: 180
max_connections: 50
retries: 1
use_prepared_statements: true
tables: "!include default/tables/tables.yaml"
```
Contributor guide
Assessment
This issue has not been assessed yet.