From 807ebaef54d5270f7bdcd3c26a8db904bf8bbbd2 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Mon, 26 Oct 2020 21:24:55 -0400 Subject: 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 Run-TryBot: Julie Qiu TryBot-Result: kokoro Reviewed-by: Jamal Carvalho --- internal/postgres/insert_module.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/postgres/insert_module.go') diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go index 991f09dc..b87928a9 100644 --- a/internal/postgres/insert_module.go +++ b/internal/postgres/insert_module.go @@ -227,7 +227,7 @@ func insertLicenses(ctx context.Context, db *database.DB, m *internal.Module, mo "module_id", } return db.BulkUpsert(ctx, "licenses", licenseCols, licenseValues, - []string{"module_path", "version", "file_path"}) + []string{"module_id", "file_path"}) } return nil } -- cgit v1.3