Loading
Add NOT VALID language ID constraints to language tables
What does this MR do and why?
Adds GitLab.com-only post-deployment migrations that add NOT VALID NOT
NULL check constraints to programming_languages.language_id and
repository_languages.language_id.
Both columns are still nullable, allowing rows without language IDs to be
reintroduced. The constraints are added without blocking deployment, with
asynchronous validation left to a separate follow-up. The constraints are
not added to db/structure.sql because they are GitLab.com-only.
References
How to set up and validate locally
- Review the migration specs for both constraints.
- Run the migration specs:
bundle exec rspec spec/migrations/20260728130100_add_programming_languages_language_id_not_null_constraint_spec.rb spec/migrations/20260728130102_add_repository_languages_language_id_not_null_constraint_spec.rb
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.