Skip to content

Commit

Permalink
Fix case sensitivty of DATABASE_MIGRATION env var (#1831)
Browse files Browse the repository at this point in the history
Co-authored-by: ammar92 <[email protected]>
  • Loading branch information
dekkers and ammar92 authored Sep 27, 2023
1 parent c04f326 commit 1a73b7f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boefjes/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi

# The migrations and seed are for the KATalogus. They are not inside the if because this way
# they can also be run when overruling the default cmd
if [ "$DATABASE_MIGRATION" = "1" ] || [ "$DATABASE_MIGRATION" = "true" ]; then
if [ "$DATABASE_MIGRATION" = "1" ] || [[ "$DATABASE_MIGRATION" = "true" ]]; then
python -m alembic --config /app/boefjes/boefjes/alembic.ini upgrade head
python -m boefjes.seed
fi
Expand Down
2 changes: 1 addition & 1 deletion bytes/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Make env variable comparison case insensitive
shopt -s nocasematch

if [ "$DATABASE_MIGRATION" = "1" ] || [ "$DATABASE_MIGRATION" = "true" ]; then
if [ "$DATABASE_MIGRATION" = "1" ] || [[ "$DATABASE_MIGRATION" = "true" ]]; then
python -m alembic --config /app/bytes/bytes/alembic.ini upgrade head
fi

Expand Down
2 changes: 1 addition & 1 deletion mula/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Make env variable comparison case insensitive
shopt -s nocasematch

if [ "$DATABASE_MIGRATION" = "1" ] || [ "$DATABASE_MIGRATION" = "true" ]; then
if [ "$DATABASE_MIGRATION" = "1" ] || [[ "$DATABASE_MIGRATION" = "true" ]]; then
python -m alembic --config /app/scheduler/scheduler/alembic.ini upgrade head
fi

Expand Down
2 changes: 1 addition & 1 deletion rocky/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Make env variable comparison case insensitive
shopt -s nocasematch

if [ "$DATABASE_MIGRATION" = "1" ] || [ "$DATABASE_MIGRATION" = "true" ]; then
if [ "$DATABASE_MIGRATION" = "1" ] || [[ "$DATABASE_MIGRATION" = "true" ]]; then
python manage.py migrate --noinput
fi

Expand Down

0 comments on commit 1a73b7f

Please sign in to comment.