diff options
| author | Julie Qiu <julie@golang.org> | 2021-01-05 14:03:11 -0500 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-01-05 20:16:37 +0000 |
| commit | 15a0220b3bbbe7f363afca3af872a463b0899d0f (patch) | |
| tree | 59b87df9624a013f417e1a29d0d6f510abd730c7 /internal/postgres/insert_module.go | |
| parent | 73f5cae8e1186aea315c08af473b6a761144e63a (diff) | |
| download | go-x-pkgsite-15a0220b3bbbe7f363afca3af872a463b0899d0f.tar.xz | |
internal/postgres: insert units.v1path_id
Change-Id: I464e1cb9b25e35fefa03df052db96ddda70026a1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/281777
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/postgres/insert_module.go')
| -rw-r--r-- | internal/postgres/insert_module.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go index a69d6c33..03c9b551 100644 --- a/internal/postgres/insert_module.go +++ b/internal/postgres/insert_module.go @@ -304,11 +304,13 @@ func (pdb *DB) insertUnits(ctx context.Context, db *database.DB, m *internal.Mod } } } + v1path := internal.V1Path(u.Path, m.ModulePath) unitValues = append(unitValues, u.Path, pathToID[u.Path], moduleID, - internal.V1Path(u.Path, m.ModulePath), + pathToID[v1path], + v1path, u.Name, pq.Array(licenseTypes), pq.Array(licensePaths), @@ -399,6 +401,7 @@ func insertUnits(ctx context.Context, db *database.DB, unitValues []interface{}) "path", "path_id", "module_id", + "v1path_id", "v1_path", "name", "license_types", |
