Add OrganizationUserDetail table and model

What does this MR do and why?

As we plan out the architecture for Organizations and Cells, we have broadened the concept of per-organization usernames to potentially include other types of data. See this handbook MR for details on this architectural decision.

We want to replace the organization_user_aliases table with the organization_user_details table. This MR is the first part of that work, adding the organization_user_details table and related ActiveRecord model. There are some improvements over the previous table, including using TEXT type rather than VARCHAR , and adding a lower composite index similar to the users table.

References

Screenshots or screen recordings

How to set up and validate locally

  1. Run migrations
  2. On Rails console, create a new Organizations::OrganizationUserDetail -
    org = Organizations::Organization.first
    user = User.first
    oud = Organizations::OrganizationUserDetail.create(organization: org, user: user, username: 'test-root-alias', display_name: 'Test Alias for Root')

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 #442780 (closed)

Edited by Andrew Evans

Merge request reports

Loading