зеркало из https://github.com/golang/pkgsite.git
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 <jba@google.com>
This commit is contained in:
Родитель
4eab8a341e
Коммит
a5b5fa45df
|
@ -45,6 +45,7 @@ type VersionMap struct {
|
|||
ModulePath string
|
||||
RequestedVersion string
|
||||
ResolvedVersion string
|
||||
GoModPath string
|
||||
Status int
|
||||
Error string
|
||||
}
|
||||
|
|
|
@ -36,14 +36,16 @@ func (db *DB) UpsertVersionMap(ctx context.Context, vm *internal.VersionMap) (er
|
|||
module_path,
|
||||
requested_version,
|
||||
resolved_version,
|
||||
go_mod_path,
|
||||
status,
|
||||
error,
|
||||
sort_version,
|
||||
module_id)
|
||||
VALUES($1,$2,$3,$4,$5,$6,$7)
|
||||
VALUES($1,$2,$3,$4,$5,$6,$7,$8)
|
||||
ON CONFLICT (module_path, requested_version)
|
||||
DO UPDATE SET
|
||||
module_path=excluded.module_path,
|
||||
go_mod_path=excluded.go_mod_path,
|
||||
requested_version=excluded.requested_version,
|
||||
resolved_version=excluded.resolved_version,
|
||||
status=excluded.status,
|
||||
|
@ -53,6 +55,7 @@ func (db *DB) UpsertVersionMap(ctx context.Context, vm *internal.VersionMap) (er
|
|||
vm.ModulePath,
|
||||
vm.RequestedVersion,
|
||||
vm.ResolvedVersion,
|
||||
vm.GoModPath,
|
||||
vm.Status,
|
||||
vm.Error,
|
||||
sortVersion,
|
||||
|
|
Загрузка…
Ссылка в новой задаче