Description
Version Information
Server Version:
CLI Version (for CLI related issue): 2.16.1
Environment
OSS
What is the current behaviour?
I'm currently using hasura/graphql-engine:v2.16.1.cli-migrations-v2 in production with one database and wanted to have multiple databases.
From the docs I understood that I needed to upgrade to config v3 and I did.
I ran hasura scripts update-project-v3 and it finished successfully and created the databases directory structure.
I then went and added another database to the databases.yaml and its relevant files according to the structure.
I replaced the docker image to hasura/graphql-engine:v2.16.1.cli-migrations-v3 and started.
I ran into this error level=fatal msg="error applying metadata \n{\n "code": "parse-failed",\n "error": "key "tables" not found",\n "path": "$.args.metadata"\n}"
I can't seem to understand what I did wrong.
How can I see more logs?
How can I know what I did wrong?
databases.yaml
- name: accounts
kind: postgres
configuration:
connection_info:
use_prepared_statements: true
database_url:
from_env: ACCOUNTS_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 60
idle_timeout: 180
max_connections: 50
retries: 1
tables: '!include accounts/tables/tables.yaml'
functions: '!include accounts/functions/functions.yaml'
- name: default
kind: postgres
configuration:
connection_info:
use_prepared_statements: true
database_url:
from_env: MAIN_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 60
idle_timeout: 180
max_connections: 50
retries: 1
tables: '!include default/tables/tables.yaml'
functions: '!include default/functions/functions.yaml'
What is the expected behaviour?
The expected behavior is for the server to start successfully and to see 2 databases in the data manager view.
How to reproduce the issue?
- Start project with config v2 using hasura/graphql-engine:v2.16.1.cli-migrations-v2
- run
hasura scripts update-project-v3
- replace image to hasura/graphql-engine:v2.16.1.cli-migrations-v3
- update databases.yaml and add another database
- add relevant files to databases dir
Screenshots or Screencast
Please provide any traces or logs that could help here.
Any possible solutions/workarounds you're aware of?
no
Keywords
config v3, tables not found, upgrade