De-scope emails.confirmation_token unique index to be per-user
What does this MR do and why?
De-scope emails.confirmation_token unique index to be per-user
De-scope emails.confirmation_token index to be per-organization Due to the constraints of the Cells architecture, we can no longer have globally UNIQUE indexes across all cells. Therefor we must scope unique indexes to the sharding constraint.
This change modifies the emails.confirmation_token unique index put in place by Devise to be per-user, since the sharding key for the emails table is on user_id. In combination with the additional routing params in the unlock instructions email, users should be routed to the correct cell where their unlock token can be looked up.
References
- See Epic for related MRs in-progress and rollout plan: &20097
- Issue: #562035
- Requires the following MRs to be merged before this is merge-able:
- De-scope
users.confirmation_token: !214348 (diffs) - Clean up FF
devise_email_organization_routes: !213743 - Add
user_idparam to secondary email confirmation routes (after FF cleanup MR is merged) : !214600
- De-scope
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #562035