Backend: Denormalize `name` in `catalog_resource_versions` table
Summary
The following discussion from !139983 (merged) should be addressed:
-
@lma-git started a discussion: If we denormalize the
namecolumn in thecatalog_resource_versionstable, we'll be able remove the JOIN withreleaseshere. Denormalizingnamewould also allow us to more easily support other version types in the future (ones that may not usetagas its unique identifier as discussed in !136081 (comment 1649709843)).Created follow up issue to address this: #436410 (closed).
Proposal
Denormalize the name column in catalog_resource_versions table. The name value should be populated with a model callback when the version object is first created. We shouldn't need to worry about updates to the tag value since GitLab doesn't support updating the tag value of a release.
You may follow a similar approach as outlined in #430117 (closed).
Note: It's important for us to ensure that the name column is fully backfilled before making code changes that depend on it. Consider updating the code in the milestone after the one in which the batched backfill migration is finalized.