internal/postgres: insert packages.commit_time
The column packages.commit_time is now populated be
postgres.InsertVersion.
Updates b/142558529
@@ -176,6 +176,7 @@ func (db *DB) saveVersion(ctx context.Context, version *internal.Version) error
pq.Array(licensePaths),
p.GOOS,
p.GOARCH,
+ version.CommitTime,
)
for _, i := range p.Imports {
importValues = append(importValues, p.Path, version.ModulePath, version.Version, i)
@@ -196,6 +197,7 @@ func (db *DB) saveVersion(ctx context.Context, version *internal.Version) error
"license_paths",
"goos",
"goarch",
+ "commit_time",
}
if err := bulkInsert(ctx, tx, "packages", pkgCols, pkgValues, onConflictDoNothing); err != nil {
return err
