Skip to content

Commit a5b5fa4

Browse files
committed
internal/postgres: populate version_map.go_mod_path
The version_map.go_mod_path column is now populated in UpsertVersionMap. Updates golang/go#36811 Updates golang/go#37002 Updates golang/go#37106 Change-Id: I4e474d28bee67caf7625045082df46f93394f3f6 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/751269 Reviewed-by: Jonathan Amsterdam <[email protected]>
1 parent 4eab8a3 commit a5b5fa4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

internal/discovery.go

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type VersionMap struct {
4545
ModulePath string
4646
RequestedVersion string
4747
ResolvedVersion string
48+
GoModPath string
4849
Status int
4950
Error string
5051
}

internal/postgres/version_map.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ func (db *DB) UpsertVersionMap(ctx context.Context, vm *internal.VersionMap) (er
3636
module_path,
3737
requested_version,
3838
resolved_version,
39+
go_mod_path,
3940
status,
4041
error,
4142
sort_version,
4243
module_id)
43-
VALUES($1,$2,$3,$4,$5,$6,$7)
44+
VALUES($1,$2,$3,$4,$5,$6,$7,$8)
4445
ON CONFLICT (module_path, requested_version)
4546
DO UPDATE SET
4647
module_path=excluded.module_path,
48+
go_mod_path=excluded.go_mod_path,
4749
requested_version=excluded.requested_version,
4850
resolved_version=excluded.resolved_version,
4951
status=excluded.status,
@@ -53,6 +55,7 @@ func (db *DB) UpsertVersionMap(ctx context.Context, vm *internal.VersionMap) (er
5355
vm.ModulePath,
5456
vm.RequestedVersion,
5557
vm.ResolvedVersion,
58+
vm.GoModPath,
5659
vm.Status,
5760
vm.Error,
5861
sortVersion,

0 commit comments

Comments
 (0)