File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,7 @@ do $$ begin
24
24
check (char_length(token_hash) > 0 )
25
25
);
26
26
27
- begin
28
- create index if not exists one_time_tokens_token_hash_hash_idx on {{ index .Options " Namespace" }}.one_time_tokens using hash (token_hash);
29
- create index if not exists one_time_tokens_relates_to_hash_idx on {{ index .Options " Namespace" }}.one_time_tokens using hash (relates_to);
30
- exception when others then
31
- -- Fallback to btree indexes if hash creation fails
32
- create index if not exists one_time_tokens_token_hash_hash_idx on {{ index .Options " Namespace" }}.one_time_tokens using btree (token_hash);
33
- create index if not exists one_time_tokens_relates_to_hash_idx on {{ index .Options " Namespace" }}.one_time_tokens using btree (relates_to);
34
- end;
35
-
27
+ create index if not exists one_time_tokens_token_hash_hash_idx on {{ index .Options " Namespace" }}.one_time_tokens using hash (token_hash);
28
+ create index if not exists one_time_tokens_relates_to_hash_idx on {{ index .Options " Namespace" }}.one_time_tokens using hash (relates_to);
36
29
create unique index if not exists one_time_tokens_user_id_token_type_key on {{ index .Options " Namespace" }}.one_time_tokens (user_id, token_type);
37
30
end $$;
You can’t perform that action at this time.
0 commit comments