Finish enforcing not null file_store and external_diff_store fields
Finish what was started #229412 (closed).
MR "Part 3 of Enforce NOT NULL external_diff_store on merge_request_diffs"
-
Add a post-deployment migration for merge_request_diffs
that:- Runs
Gitlab::BackgroundMigration.steal
on the background migration created above - Runs
MergeRequestDiff.where(external_diff_store: nil, external: true).each_batch { |batch| batch.update_all(external_diff_store: ObjectStorage::Store::LOCAL) }
- Runs
-
Add a post-deployment migration for merge_request_diffs
that:- Enforces the constraint:
validate_not_null_constraint(:merge_request_diffs, :external_diff_store)
- Enforces the constraint:
This is basically cleanup and strong enforcement. Replication can be released in the previous release if it is ready.
MR "Part 2 of Enforce NOT NULL file_store on packages_package_files"
(Why Part 2 and not Part 3?: The initial work for MR diffs happened over 2 MRs, and that was copied for package files in 1 MR)
-
Copy "Part 3 of Enforce NOT NULL external_diff_store on merge_request_diffs" but for packages_package_files
This is basically cleanup and strong enforcement.
Edited by Michael Kozono