mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +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"
|
cd "$TEMP_MIGRATIONS_DIR"
|
||||||
echo "endpoint: http://localhost:$HASURA_GRAPHQL_SERVER_PORT" > config.yaml
|
echo "endpoint: http://localhost:$HASURA_GRAPHQL_SERVER_PORT" > config.yaml
|
||||||
hasura-cli migrate apply
|
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
|
if [ -f migrations/metadata.yaml ]; then
|
||||||
log "applying metadata from $HASURA_GRAPHQL_MIGRATIONS_DIR/metadata.yaml"
|
log "applying metadata from $HASURA_GRAPHQL_MIGRATIONS_DIR/metadata.yaml"
|
||||||
hasura-cli metadata apply
|
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
|
fi
|
||||||
else
|
else
|
||||||
log "directory $HASURA_GRAPHQL_MIGRATIONS_DIR does not exist, skipping migrations"
|
log "directory $HASURA_GRAPHQL_MIGRATIONS_DIR does not exist, skipping migrations"
|
||||||
|
Loading…
Reference in New Issue
Block a user