Skip to content

Commit 807ebae

Browse files
committed
internal/postgres: change ON CONFLICT key in insertLicenses
insertLicenses now uses licenses (module_id, file_path) as the ON CONFLICT key. For golang/go#39629 Change-Id: Ib85a61f538a176c1bfff7a070121162405ef21dc Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/265241 Trust: Julie Qiu <[email protected]> Run-TryBot: Julie Qiu <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]>
1 parent b8a5f33 commit 807ebae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/postgres/insert_module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func insertLicenses(ctx context.Context, db *database.DB, m *internal.Module, mo
227227
"module_id",
228228
}
229229
return db.BulkUpsert(ctx, "licenses", licenseCols, licenseValues,
230-
[]string{"module_path", "version", "file_path"})
230+
[]string{"module_id", "file_path"})
231231
}
232232
return nil
233233
}

0 commit comments

Comments
 (0)