Skip to content

Commit

Permalink
run each migration in its own transaction
Browse files Browse the repository at this point in the history
Running the whole set of migrations in a single transaction (the TypeORM
default) would cause issues with some enums not being committed before
they are used. This wasn't causing issues so far in the CI pipelines
(where the change in this commit is relevant) just because of an
unrelated bug that caused migrations runs to be tried twice (with
nothing being done the second time through the shell command changed in
this commit as the migrations had already run).
  • Loading branch information
hotzevzl committed Nov 16, 2021
1 parent 3b360d7 commit 5d86455
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/apps/api/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case "$1" in
run-migrations-for-e2e-tests)
echo "(ESC)[44m Running migrations (api db) for e2e Tests in Api (ESC)[0m"
sleep 15
exec yarn api:typeorm migration:run
exec yarn api:typeorm migration:run -t each
;;
start)
echo "Running Start"
Expand Down
2 changes: 1 addition & 1 deletion api/apps/geoprocessing/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ case "$1" in
run-migrations-for-e2e-tests)
echo "(ESC)[44m Running migrations (geoprocessing db) for e2e Tests(ESC)[0m"
sleep 15
exec yarn geoprocessing:typeorm migration:run
exec yarn geoprocessing:typeorm migration:run -t each
;;
start)
echo "Running Start"
Expand Down

0 comments on commit 5d86455

Please sign in to comment.