Skip to content

Commit

Permalink
fix groupedmessage indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertdeng123 committed Feb 8, 2024
1 parent 302b22b commit dab2f17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions install/set-up-and-migrate-database.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
echo "${_group}Setting up / migrating database ..."

# Fixes https://github.com/getsentry/self-hosted/issues/2758, where a migration fails due to indexing issue
indexes=$($dc exec postgres psql -qAt -U postgres -c "SELECT indexname, indexdef FROM pg_indexes WHERE tablename = 'sentry_groupedmessage';")
if [[ $indexes == *"sentry_groupedmessage_project_id_id_515aaa7e_uniq"* ]]; then
$dc postgres psql -qAt -U postgres -c "DROP INDEX sentry_groupedmessage_project_id_id_515aaa7e_uniq;"
fi

if [[ -n "${CI:-}" || "${SKIP_USER_CREATION:-0}" == 1 ]]; then
$dcr web upgrade --noinput
echo ""
Expand Down

0 comments on commit dab2f17

Please sign in to comment.