Skip to content

Commit

Permalink
Fix conflict in rhnerratacve
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Jan 8, 2024
1 parent 463d40a commit 637092d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dumper/dataWriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,19 @@ func formatOnConflict(row []sqlUtil.RowDataStructure, table schemareader.Table)
} else {
constraint = "(advisory, org_id) WHERE org_id IS NOT NULL"
}
case "rhnerratacve":
var errataId interface{} = nil
for _, field := range row {
if strings.Compare(field.ColumnName, "errata_id") == 0 {
errataId = field.Value
break
}
}
if errataId == nil {
constraint = "(cve_id) WHERE errata_id IS NULL"
} else {
constraint = "(cve_id, errata_id) WHERE errata_id IS NOT NULL"
}
case "rhnpackageevr":
var epoch interface{} = nil
for _, field := range row {
Expand Down

0 comments on commit 637092d

Please sign in to comment.