Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Use django ORM to perform sql commands #2827

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tweak command
  • Loading branch information
hubertdeng123 committed Feb 26, 2024
commit aab3d43a8e53aa0e335f2f6ba0ec88cee0a17b20
3 changes: 1 addition & 2 deletions install/set-up-and-migrate-database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ echo "${_group}Setting up / migrating database ..."

# Fixes https://github.com/getsentry/self-hosted/issues/2758, where a migration fails due to indexing issue
$dc up -d postgres
$dc up -d web
# Wait for postgres
RETRIES=5
until $dc exec postgres psql -U postgres -c "select 1" >/dev/null 2>&1 || [ $RETRIES -eq 0 ]; do
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..."
sleep 1
done

$dc exec web sentry shell -c "
$dcr web shell -c "
from django.db import connection

with connection.cursor() as cursor:
Expand Down
Loading