Skip to content

Commit

Permalink
fix(seed): fix du seed pour d'abord inserer les données issues du mar…
Browse files Browse the repository at this point in the history
…kdown avant de faire le seed
  • Loading branch information
dthib committed Aug 19, 2024
1 parent 4881200 commit 9e0a25e
Show file tree
Hide file tree
Showing 5 changed files with 5,841 additions and 5,842 deletions.
3 changes: 2 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,15 @@ dev:
IF [ "$faster" = "no" ]
RUN earthly +db-deploy --to @$version --DB_URL=$DB_URL

RUN earthly +load-json --SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY --API_URL=$API_URL

# Seed si aucune collectivité en base
RUN docker run --rm \
--network $network \
psql:latest $DB_URL -v ON_ERROR_STOP=1 \
-c "select 1 / count(*) from collectivite;" \
|| earthly +seed --DB_URL=$DB_URL

RUN earthly +load-json --SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY --API_URL=$API_URL
END
END

Expand Down
2 changes: 0 additions & 2 deletions data_layer/seed/content/18-truncate.sql

This file was deleted.

Loading

0 comments on commit 9e0a25e

Please sign in to comment.