We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de9f52f commit 2346a69Copy full SHA for 2346a69
install/set-up-and-migrate-database.sh
@@ -1,5 +1,13 @@
1
echo "${_group}Setting up / migrating database ..."
2
3
+# Fixes https://github.com/getsentry/self-hosted/issues/2758, where a migration fails due to indexing issue
4
+$dc up -d postgres
5
+timeout 90s bash -c "until $dc exec postgres pg_isready ; do sleep 5 ; done"
6
+indexes=$($dc exec postgres psql -qAt -U postgres -c "SELECT indexname, indexdef FROM pg_indexes WHERE tablename = 'sentry_groupedmessage';")
7
+if [[ $indexes == *"sentry_groupedmessage_project_id_id_515aaa7e_uniq"* ]]; then
8
+ $dc postgres psql -qAt -U postgres -c "DROP INDEX sentry_groupedmessage_project_id_id_515aaa7e_uniq;"
9
+fi
10
+
11
if [[ -n "${CI:-}" || "${SKIP_USER_CREATION:-0}" == 1 ]]; then
12
$dcr web upgrade --noinput
13
echo ""
0 commit comments