Add plan_name_uid column to plans table

What does this MR do and why?

This MR adds plan_name_uid to plans table. This column will be used to convert the plans table to have hard-coded primary key and globally unique reference for Cells infrastructure.

  • Plans table is a small table with total 12 rows only.
  • new records can only inserted via database migration
  • Thus, there is no significant application code that creates new record, or updates existing record.
  • Only two places seems to have find_or_create for default plan and free plan

Database

gitlabhq_dblab=# select name, title from plans;
             name             |              title
------------------------------+----------------------------------
 default                      | Default
 early_adopter                | GitLab.com Early Adopter
 bronze                       | Bronze
 silver                       | Silver
 gold                         | Gold
 free                         | Free
 ultimate_trial               | Ultimate Trial
 premium_trial                | Premium Trial
 opensource                   | Open Source Program
 premium                      | Premium
 ultimate                     | Ultimate
 ultimate_trial_paid_customer | Ultimate Trial for Paid Customer
(12 rows)

References

How to set up and validate locally

  • Green CI

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.

Edited by Bishwa Hang Rai

Merge request reports

Loading