Skip to content

[management] during JSON migration filter duplicates on conflict #4303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

pascal-fischer
Copy link
Collaborator

Describe your changes

In case of dublicated peer entries in the same group we filter those during migration to comply with the uniqueness constraint.

Issue ticket number and link

#4299

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 09:19
Copy link

sonarqubecloud bot commented Aug 7, 2025

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a database migration issue by filtering duplicate peer entries during JSON-to-table migration to comply with uniqueness constraints. The change prevents migration failures when duplicate entries exist in the same group.

  • Adds conflict handling during database migration to skip duplicate entries
  • Uses GORM's OnConflict clause with DoNothing strategy to handle uniqueness violations

@pascal-fischer pascal-fischer merged commit 9e95841 into main Aug 7, 2025
53 of 54 checks passed
@pascal-fischer pascal-fischer deleted the fix/group-migration-duplicate-entry branch August 7, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants