diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-26 21:11:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-26 21:11:00 +0300 |
commit | a2f6474ee7cf1f5a48aa4c0176d3cc560d58f17d (patch) | |
tree | 8b23a93294cdac8b21a5932dca5cc142c0d3c5a3 /db/post_migrate | |
parent | 0a5eac24023a5df68973fe0bbe4b3fd172aeac10 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20231213080216_finalize_merge_request_diffs_project_id_backfill.rb | 21 | ||||
-rw-r--r-- | db/post_migrate/20231213080238_validate_merge_request_diffs_project_id_null_constraint.rb | 11 |
2 files changed, 32 insertions, 0 deletions
diff --git a/db/post_migrate/20231213080216_finalize_merge_request_diffs_project_id_backfill.rb b/db/post_migrate/20231213080216_finalize_merge_request_diffs_project_id_backfill.rb new file mode 100644 index 00000000000..cb83b00b2a2 --- /dev/null +++ b/db/post_migrate/20231213080216_finalize_merge_request_diffs_project_id_backfill.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeMergeRequestDiffsProjectIdBackfill < Gitlab::Database::Migration[2.2] + milestone '16.8' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'BackfillMergeRequestDiffsProjectId', + table_name: :merge_request_diffs, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/post_migrate/20231213080238_validate_merge_request_diffs_project_id_null_constraint.rb b/db/post_migrate/20231213080238_validate_merge_request_diffs_project_id_null_constraint.rb new file mode 100644 index 00000000000..6e2d591bd96 --- /dev/null +++ b/db/post_migrate/20231213080238_validate_merge_request_diffs_project_id_null_constraint.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class ValidateMergeRequestDiffsProjectIdNullConstraint < Gitlab::Database::Migration[2.2] + milestone '16.8' + + def up + validate_not_null_constraint :merge_request_diffs, :project_id + end + + def down; end +end |