Skip to content

Commit

Permalink
Merge pull request #17337 from eduardoj/fix/data_migration_backfill_w…
Browse files Browse the repository at this point in the history
…ith_udpate_columns

Fix bs_request_actions backfill data migration
  • Loading branch information
eduardoj authored Feb 4, 2025
2 parents e0f70de + d5dae0a commit 827c28f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ def up
if action.source_package.present?
source_package = Package.find_by_project_and_name(action.source_project, action.source_package)
if source_package
action.update_attribute(:source_project_id, source_package.project.id)
action.update_attribute(:source_package_id, source_package.id)
action.update_columns(source_project_id: source_package.project.id, source_package_id: source_package.id)
end
next
end

source_project = Project.find_by(name: action.source_project)
if source_project
action.update_attribute(:source_project_id, source_project.id)
action.update_columns(source_project_id: source_project.id)
end
end
end
Expand Down

0 comments on commit 827c28f

Please sign in to comment.