Validate `Environment.tier` presence always
Problem
We introduced background migration to backfill environments.tier in !105998 (merged). However, we don't validate the tier existence for all existing environments yet. We should validate for data integrity.
Proposal
-
Make sure that the BackfillEnvironmentTiersBG migration completed. -
Cleanup the migration https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#cleaning-up -
Run finalize_batched_background_migration.
-
-
Update the validation to validates :tier, presence: trueinEnvironmentmodel.
Auto Generated
The following discussion from !105998 (merged) should be addressed:
-
@shinya.maeda started a discussion: I'll create a follow-up issue.
Edited by Bala Kumar