De-scope users.confirmation_token to be per-organiztion

What does this MR do and why?

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 users.confirmation_token unique index put in place by Devise to be per-organization. In combination with the organization routing in the confirmation instructions email, users should be routed to the correct cell where their confirmation token can be looked up.

References

  • See Epic for related MRs in-progress and rollout plan: &20097
  • Issue: #562090
  • MR updating email routes: !212116 (merged)
  • De-scoping emails.confirmation_token follows directly and requires code from this MR: !214499

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 #562090

Edited by Andrew Evans

Merge request reports

Loading