mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
/scripts/cli-migrations/docker-entrypoint.sh only checks for metadata.yaml, however, https://docs.hasura.io/1.0/graphql/manual/migrations/manage-metadata.html#exporting-hasura-metadata talks about a metadata.json
This commit is contained in:
parent
86192511a4
commit
22656cefbd
@ -54,10 +54,13 @@ if [ -d "$HASURA_GRAPHQL_MIGRATIONS_DIR" ]; then
|
||||
cd "$TEMP_MIGRATIONS_DIR"
|
||||
echo "endpoint: http://localhost:$HASURA_GRAPHQL_SERVER_PORT" > config.yaml
|
||||
hasura-cli migrate apply
|
||||
# check if metadata.yaml exist and apply
|
||||
# check if metadata.[yaml|json] exist and apply
|
||||
if [ -f migrations/metadata.yaml ]; then
|
||||
log "applying metadata from $HASURA_GRAPHQL_MIGRATIONS_DIR/metadata.yaml"
|
||||
hasura-cli metadata apply
|
||||
elif [ -f migrations/metadata.json ]; then
|
||||
log "applying metadata from $HASURA_GRAPHQL_MIGRATIONS_DIR/metadata.json"
|
||||
hasura-cli metadata apply
|
||||
fi
|
||||
else
|
||||
log "directory $HASURA_GRAPHQL_MIGRATIONS_DIR does not exist, skipping migrations"
|
||||
|
Loading…
Reference in New Issue
Block a user