diff --git a/migrations/20240729123726_add_mfa_phone_config.up.sql b/migrations/20240729123726_add_mfa_phone_config.up.sql index 47a47681f..cd52973ed 100644 --- a/migrations/20240729123726_add_mfa_phone_config.up.sql +++ b/migrations/20240729123726_add_mfa_phone_config.up.sql @@ -11,4 +11,4 @@ alter table {{ index .Options "Namespace" }}.mfa_challenges add column if not ex create index if not exists idx_sent_at on {{ index .Options "Namespace" }}.mfa_challenges(sent_at); -create unique index unique_verified_phone_factor on {{ index .Options "Namespace" }}.mfa_factors (user_id, phone) where status = 'verified'; +create unique index if not exists unique_verified_phone_factor on {{ index .Options "Namespace" }}.mfa_factors (user_id, phone);