From c9bd1af0ae5e8b04e2bc216722c7e58eb94935fa Mon Sep 17 00:00:00 2001 From: issuedat <165281975+issuedat@users.noreply.github.com> Date: Tue, 25 Nov 2025 09:45:22 +0100 Subject: [PATCH] chore: remove `text_pattern_ops` index on `phone` column --- internal/indexworker/indexworker.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/indexworker/indexworker.go b/internal/indexworker/indexworker.go index 64e8f0415..2bfc7bdac 100644 --- a/internal/indexworker/indexworker.go +++ b/internal/indexworker/indexworker.go @@ -308,12 +308,6 @@ func getUsersIndexes(namespace, trgmSchema string) []struct { query: fmt.Sprintf(`CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_users_email_trgm ON %q.users USING gin (email %s.gin_trgm_ops);`, namespace, trgmSchema), }, - // enables exact-match and prefix searches and sorting by phone number - { - name: "idx_users_phone_pattern", - query: fmt.Sprintf(`CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_users_phone_pattern - ON %q.users USING btree (phone text_pattern_ops);`, namespace), - }, // for range queries and sorting on created_at and last_sign_in_at { name: "idx_users_created_at_desc",