Skip to content
代码片段 群组 项目
未验证 提交 f91bfc18 编辑于 作者: Adam Hegyi's avatar Adam Hegyi 提交者: GitLab
浏览文件

Merge branch '430843-remove-temporary-indexes' into 'master'

Remove temporary index for migration

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136787



Merged-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Approved-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Reviewed-by: default avatarTianwen Chen <tchen@gitlab.com>
Co-authored-by: default avatarj.seto <jseto@gitlab.com>
No related branches found
No related tags found
无相关合并请求
显示
150 个添加6 个删除
...@@ -5,3 +5,4 @@ feature_category: source_code_management ...@@ -5,3 +5,4 @@ feature_category: source_code_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337
milestone: '16.6' milestone: '16.6'
queued_migration_version: 20231016173129 queued_migration_version: 20231016173129
finalized_by: 20240111195101
...@@ -5,3 +5,4 @@ feature_category: source_code_management ...@@ -5,3 +5,4 @@ feature_category: source_code_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337
milestone: '16.6' milestone: '16.6'
queued_migration_version: 20231016194927 queued_migration_version: 20231016194927
finalized_by: 20240111194808
...@@ -5,3 +5,4 @@ feature_category: source_code_management ...@@ -5,3 +5,4 @@ feature_category: source_code_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337
milestone: '16.6' milestone: '16.6'
queued_migration_version: 20231016194943 queued_migration_version: 20231016194943
finalized_by: 20240111194603
# frozen_string_literal: true
class FinalizeDeleteInvalidProtectedTagCreateAccessLevels < Gitlab::Database::Migration[2.2]
milestone '16.8'
MIGRATION = 'DeleteInvalidProtectedTagCreateAccessLevels'
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
ensure_batched_background_migration_is_finished(
job_class_name: MIGRATION,
table_name: :protected_tag_create_access_levels,
column_name: :id,
job_arguments: [],
finalize: true
)
end
def down
# no-op
end
end
# frozen_string_literal: true
class DropTempIndexOnProtectedTagCreateAccessLevels < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '16.8'
INDEX_NAME = 'tmp_idx_protected_tag_create_access_levels_on_id_with_group'
def up
remove_concurrent_index_by_name(
:protected_tag_create_access_levels,
INDEX_NAME
)
end
def down
add_concurrent_index(
:protected_tag_create_access_levels,
%i[id],
where: 'group_id IS NOT NULL',
name: INDEX_NAME
)
end
end
# frozen_string_literal: true
class FinalizeDeleteInvalidProtectedBranchPushAccessLevels < Gitlab::Database::Migration[2.2]
milestone '16.8'
MIGRATION = 'DeleteInvalidProtectedBranchPushAccessLevels'
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
ensure_batched_background_migration_is_finished(
job_class_name: MIGRATION,
table_name: :protected_branch_push_access_levels,
column_name: :id,
job_arguments: [],
finalize: true
)
end
def down
# no-op
end
end
# frozen_string_literal: true
class DropTempIndexOnProtectedBranchPushAccessLevels < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '16.8'
INDEX_NAME = 'tmp_idx_protected_branch_push_access_levels_on_id_with_group'
def up
remove_concurrent_index_by_name(
:protected_branch_push_access_levels,
INDEX_NAME
)
end
def down
add_concurrent_index(
:protected_branch_push_access_levels,
%i[id],
where: 'group_id IS NOT NULL',
name: INDEX_NAME
)
end
end
# frozen_string_literal: true
class FinalizeDeleteInvalidProtectedBranchMergeAccessLevels < Gitlab::Database::Migration[2.2]
milestone '16.8'
MIGRATION = 'DeleteInvalidProtectedBranchMergeAccessLevels'
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
ensure_batched_background_migration_is_finished(
job_class_name: MIGRATION,
table_name: :protected_branch_merge_access_levels,
column_name: :id,
job_arguments: [],
finalize: true
)
end
def down
# no-op
end
end
# frozen_string_literal: true
class DropTempIndexOnProtectedBranchMergeAccessLevels < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '16.8'
INDEX_NAME = 'tmp_idx_protected_branch_merge_access_levels_on_id_with_group'
def up
remove_concurrent_index_by_name(
:protected_branch_merge_access_levels,
INDEX_NAME
)
end
def down
add_concurrent_index(
:protected_branch_merge_access_levels,
%i[id],
where: 'group_id IS NOT NULL',
name: INDEX_NAME
)
end
end
cd476c18128010183f94f09c4543716f2e3bdd78c11209dcec500d5506e3f7b2
\ No newline at end of file
5f10603c43a631785057b2ad8c5f4e0de84c2499b3f862b5b851e28a3c9769ea
\ No newline at end of file
80a807f90560abd387b7579255e2301ba3b8bde4f25ca4ff1ecb83e4b3b42163
\ No newline at end of file
7cf8a9d321e212f49de7419a3827e3c18504f7a98900738c1fb7e82661743c92
\ No newline at end of file
560e3a35eee5ace51635ebc504d785b6008914316e8078a68f7cb735e14fc6c1
\ No newline at end of file
6e6b2669c731d4922cbe42adf003b5b934f4690a5466b166b9112f05681db62b
\ No newline at end of file
...@@ -36132,12 +36132,6 @@ CREATE INDEX tmp_idx_orphaned_approval_merge_request_rules ON approval_merge_req ...@@ -36132,12 +36132,6 @@ CREATE INDEX tmp_idx_orphaned_approval_merge_request_rules ON approval_merge_req
   
CREATE INDEX tmp_idx_orphaned_approval_project_rules ON approval_project_rules USING btree (id) WHERE ((report_type = ANY (ARRAY[2, 4])) AND (security_orchestration_policy_configuration_id IS NULL)); CREATE INDEX tmp_idx_orphaned_approval_project_rules ON approval_project_rules USING btree (id) WHERE ((report_type = ANY (ARRAY[2, 4])) AND (security_orchestration_policy_configuration_id IS NULL));
   
CREATE INDEX tmp_idx_protected_branch_merge_access_levels_on_id_with_group ON protected_branch_merge_access_levels USING btree (id) WHERE (group_id IS NOT NULL);
CREATE INDEX tmp_idx_protected_branch_push_access_levels_on_id_with_group ON protected_branch_push_access_levels USING btree (id) WHERE (group_id IS NOT NULL);
CREATE INDEX tmp_idx_protected_tag_create_access_levels_on_id_with_group ON protected_tag_create_access_levels USING btree (id) WHERE (group_id IS NOT NULL);
CREATE INDEX tmp_index_ci_job_artifacts_on_expire_at_where_locked_unknown ON ci_job_artifacts USING btree (expire_at, job_id) WHERE ((locked = 2) AND (expire_at IS NOT NULL)); CREATE INDEX tmp_index_ci_job_artifacts_on_expire_at_where_locked_unknown ON ci_job_artifacts USING btree (expire_at, job_id) WHERE ((locked = 2) AND (expire_at IS NOT NULL));
   
CREATE INDEX tmp_index_cis_vulnerability_reads_on_id ON vulnerability_reads USING btree (id) WHERE (report_type = 7); CREATE INDEX tmp_index_cis_vulnerability_reads_on_id ON vulnerability_reads USING btree (id) WHERE (report_type = 7);
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册