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
Trust: Julie Qiu
Run-TryBot: Julie Qiu
TryBot-Result: kokoro
@@ -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
}
