Remove stale ignore_column entries from CD models
What does this MR do and why?
Remove overdue ignore_column entries from CD models. Each one tracked a column that was already removed in milestone 19.2 (released), so the ignores are leftovers that should have been cleaned up in 19.3. This is a model-only change: the columns are already gone from the schema, so there is no migration and no db/structure.sql change.
An ignore_column is only safe to remove once its column has been dropped in a released milestone. All entries below were verified against db/structure.sql (column absent) and their drop migrations (all milestone 19.2).
Entries removed
| Model | ignore_column removed |
Column dropped by (19.2) |
|---|---|---|
cd/artifact_source.rb |
:project_id, :source_type |
remove_cd_artifact_sources_legacy_columns |
cd/rollout.rb |
:environment_id |
remove_environment_id_from_cd_rollouts |
cd/version_set.rb |
:environment_id |
remove_environment_id_from_cd_version_sets |
cd/environment.rb |
:cluster_agent_id, :platform_type, :region |
remove_cd_environments_legacy_columns |
cd/deployment.rb |
:rollout_id, :version_set_entry_id |
remove_cd_deployments_legacy_columns |
cd/rollout_transition.rb |
:principal_type |
cleanup_rename_principal_type_to_principal_on_cd_rollout_transitions |
cd/deployment_transition.rb |
:principal_type |
cleanup_rename_principal_type_to_principal_on_cd_deployment_transitions |
(principal_type was a concurrent column rename to principal; the cleanup step that dropped the old column shipped in 19.2, which is why it had an ignore_column.)
Kept intentionally
:group_id(all CD models) — these columns are being dropped now via https://gitlab.com/gitlab-org/gitlab/-/work_items/602934; theirignore_columnentries are removed in a follow-up next milestone.:principal_id(rollout_transition,deployment_transition) — the column is still present (remove_with: '19.4'), so its ignore stays until the column is dropped and that drop is released.
Why it's safe
- Columns are already absent from
db/structure.sql. - All drops are milestone
19.2(released long before19.4), so removing the ignores now cannot cause Rails to select a not-yet-dropped column during a deploy. - No migration, no schema change; purely removing dead model annotations.
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.