aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-02-06 11:35:20 -0500
committerJonathan Amsterdam <jba@google.com>2021-02-09 15:19:45 +0000
commitcfd1df27be6fd41e1da94bd697b88617a114830a (patch)
tree14157195f0655890903882b9afe977d500ce7972 /internal/postgres/insert_module.go
parentf88089bebbc97760d09babe97bbc60a193ba0430 (diff)
downloadgo-x-pkgsite-cfd1df27be6fd41e1da94bd697b88617a114830a.tar.xz
internal/postgres: read and write deprecated comment
Insert the deprecated comment into the modules table, and read it back out. For golang/go#41321 Change-Id: Ib4f2c8ceb70e28940b18f52d25b2a0d05c57648d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/290098 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/postgres/insert_module.go')
-rw-r--r--internal/postgres/insert_module.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go
index 5780640c..095bcacd 100644
--- a/internal/postgres/insert_module.go
+++ b/internal/postgres/insert_module.go
@@ -176,8 +176,9 @@ func insertModule(ctx context.Context, db *database.DB, m *internal.Module) (_ i
source_info,
redistributable,
has_go_mod,
+ deprecated_comment,
incompatible)
- VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)
+ VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)
ON CONFLICT
(module_path, version)
DO UPDATE SET
@@ -193,6 +194,7 @@ func insertModule(ctx context.Context, db *database.DB, m *internal.Module) (_ i
sourceInfoJSON,
m.IsRedistributable,
m.HasGoMod,
+ m.DeprecatedComment,
isIncompatible(m.Version),
).Scan(&moduleID)
if err != nil {