diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-03 15:09:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-03 15:09:42 +0000 |
commit | a99d0fa6922be88307b1c80330a257c55c5d8270 (patch) | |
tree | 948c3d8d846bfa5ef2fd17c84cee467d678e6f1b /db | |
parent | 077b0a79d52753d020280ed8d58f97f8207b42de (diff) | |
download | gitlab-ce-a99d0fa6922be88307b1c80330a257c55c5d8270.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
4 files changed, 26 insertions, 22 deletions
diff --git a/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb b/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb index 3db21c290b9..e5d97d890ab 100644 --- a/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb +++ b/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb @@ -12,19 +12,11 @@ class ScheduleDestroyInvalidGroupMembers < Gitlab::Database::Migration[2.0] disable_ddl_transaction! def up - queue_batched_background_migration( - MIGRATION, - :members, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) + # no-op + # We want to no-op this due to potential inconsistencies in SM upgrade path end def down - delete_batched_background_migration(MIGRATION, :members, :id, []) + # no-op end end diff --git a/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb b/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb index bc90232f855..9de3ac34669 100644 --- a/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb +++ b/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb @@ -10,19 +10,11 @@ class ScheduleDestroyInvalidProjectMembers < Gitlab::Database::Migration[2.0] restrict_gitlab_migration gitlab_schema: :gitlab_main def up - queue_batched_background_migration( - MIGRATION, - :members, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) + # no-op + # We want to no-op this due to potential inconsistencies in SM upgrade path end def down - delete_batched_background_migration(MIGRATION, :members, :id, []) + # no-op end end diff --git a/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb b/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb new file mode 100644 index 00000000000..6fb358e57ab --- /dev/null +++ b/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class DeleteRemoveInvalidMemberMigration < Gitlab::Database::Migration[2.0] + PROJECT_MEMBER_MIGRATION = 'ScheduleDestroyInvalidProjectMembers' + GROUP_MEMBER_MIGRATION = 'ScheduleDestroyInvalidGroupMembers' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + delete_batched_background_migration(PROJECT_MEMBER_MIGRATION, :members, :id, []) + delete_batched_background_migration(GROUP_MEMBER_MIGRATION, :members, :id, []) + end + + def down + # no-op + end +end diff --git a/db/schema_migrations/20220929101947 b/db/schema_migrations/20220929101947 new file mode 100644 index 00000000000..4969db4f283 --- /dev/null +++ b/db/schema_migrations/20220929101947 @@ -0,0 +1 @@ +946e773d09863fe029507ac44b41a61ed0b6b766f7296759743cf09addfacfcd
\ No newline at end of file |