Drop group_id from CD version and artifact tables

What does this MR do and why?

Drop the group_id column, its foreign key to namespaces, and its index from four CD tables:

  • cd_artifact_sources
  • cd_versions
  • cd_version_sets
  • cd_version_set_entries

The application and GraphQL layers no longer read or write group_id (handled in #602765 and !240565 (merged)), and the column was ignore_column'd in a prior milestone, so these post-deployment drops are safe.

The ignore_column :group_id entries are intentionally kept in the models here and removed in a follow-up next milestone, once these drops have deployed (the ignore must outlive the drop to avoid selecting a dropped column during the rolling deploy).

The remaining CD tables (cd_services, cd_rollouts, cd_deployments) are dropped in a separate MR.

Data deletion

  • What's deleted: only the unused group_id column (plus its index and FK) on cd_artifact_sources, cd_versions, cd_version_sets, cd_version_set_entries. No rows are deleted.
  • Recovery: the migrations are reversible, down re-adds the column, index, and FK. The column values are not recoverable, but group_id has been unused since the app/GraphQL stopped reading and writing it (#602765 / !240565 (merged)), so there is nothing functional to recover.
  • Records affected: these are CD tables with the feature being developed behind the FF with a small number of rows on GitLab.com; the dropped column is unused.
  • User experience impact: none, group_id is not read or written anywhere.

References

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 Agnes Slota

Merge request reports

Loading
Loading