Add plan_name_uid columns to referencing tables
Objective
Add new plan_name_uid and hosted_plan_name_uid columns to all tables that reference the plans table and create backfill migrations.
Prerequisites
-
Plans table enum column completed (#571419 (closed))
Scope
Add new columns to tables that reference plans:
-
plan_limits→ addplan_name_uid -
gitlab_subscriptions→ addhosted_plan_name_uid -
gitlab_subscription_histories→ addhosted_plan_name_uid -
ci_pending_builds→ addplan_name_uid(if applicable) -
instance_type_ci_runners→ addplan_name_uid(if applicable) -
project_type_ci_runners→ addplan_name_uid(if applicable)
Tasks
-
Create migrations to add new columns to all referencing tables -
Add indexes on new columns for performance
Migration Strategy
For each table:
- Add new
*_name_uidcolumn as nullable integer - Add index on new column
Acceptance Criteria
-
All referencing tables have new *_name_uidcolumns -
Indexes created for performance -
No data loss during migration -
Migrations are reversible -
Edge cases handled appropriately
References
- Parent Epic: Convert `plans` table to be hard-coded in appli... (&19409)
- Original Issue: #519892 (closed)
- Previous: #571419 (closed)
Edited by 🤖 GitLab Bot 🤖