Commit b9af5066 authored by Andreas Brandl's avatar Andreas Brandl

Refactor and remove #prepare_relation method

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65054
parent 988dc805
...@@ -10,12 +10,5 @@ module Projects ...@@ -10,12 +10,5 @@ module Projects
true true
end end
private
def prepare_relation(relation, id_param = :id)
# TODO: Refactor and remove this method (https://gitlab.com/gitlab-org/gitlab-ce/issues/65054)
relation
end
end end
end end
...@@ -16,8 +16,7 @@ module Projects ...@@ -16,8 +16,7 @@ module Projects
private private
def move_deploy_keys_projects def move_deploy_keys_projects
prepare_relation(non_existent_deploy_keys_projects) non_existent_deploy_keys_projects.update_all(project_id: @project.id)
.update_all(project_id: @project.id)
end end
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -16,8 +16,7 @@ module Projects ...@@ -16,8 +16,7 @@ module Projects
private private
def move_lfs_objects_projects def move_lfs_objects_projects
prepare_relation(non_existent_lfs_objects_projects) non_existent_lfs_objects_projects.update_all(project_id: @project.lfs_storage_project.id)
.update_all(project_id: @project.lfs_storage_project.id)
end end
def remove_remaining_lfs_objects_project def remove_remaining_lfs_objects_project
......
...@@ -16,8 +16,7 @@ module Projects ...@@ -16,8 +16,7 @@ module Projects
private private
def move_notification_settings def move_notification_settings
prepare_relation(non_existent_notifications) non_existent_notifications.update_all(source_id: @project.id)
.update_all(source_id: @project.id)
end end
# Remove remaining notification settings from source_project # Remove remaining notification settings from source_project
......
...@@ -21,8 +21,7 @@ module Projects ...@@ -21,8 +21,7 @@ module Projects
private private
def move_project_authorizations def move_project_authorizations
prepare_relation(non_existent_authorization, :user_id) non_existent_authorization.update_all(project_id: @project.id)
.update_all(project_id: @project.id)
end end
def remove_remaining_authorizations def remove_remaining_authorizations
......
...@@ -20,8 +20,7 @@ module Projects ...@@ -20,8 +20,7 @@ module Projects
private private
def move_group_links def move_group_links
prepare_relation(non_existent_group_links) non_existent_group_links.update_all(project_id: @project.id)
.update_all(project_id: @project.id)
end end
# Remove remaining project group links from source_project # Remove remaining project group links from source_project
......
...@@ -20,7 +20,7 @@ module Projects ...@@ -20,7 +20,7 @@ module Projects
private private
def move_project_members def move_project_members
prepare_relation(non_existent_members).update_all(source_id: @project.id) non_existent_members.update_all(source_id: @project.id)
end end
def remove_remaining_members def remove_remaining_members
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment