aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2021-04-13 07:23:46 -0400
committerJonathan Amsterdam <jba@google.com>2021-04-13 18:23:28 +0000
commit58432cb4a09e6f2dcceb32b3bc8fd460d06b0c33 (patch)
tree7f1db77c5c3cc9bd21adec225c5e8f2d0092850f /internal/postgres/insert_module.go
parent08612630e8ed17c345e5e516c53cc134cfe5c067 (diff)
downloadgo-x-pkgsite-58432cb4a09e6f2dcceb32b3bc8fd460d06b0c33.tar.xz
internal/postgres: remove uses of modules.deprecated_comment
The deprecated_column in the modules table has been superseded by the information in the latest_module_versions table. For golang/go#43265 Change-Id: Ib53e0b295a3edf8e807ff825b36baa6701b927b1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309610 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/insert_module.go')
-rw-r--r--internal/postgres/insert_module.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go
index ea2a4bde..732b64b7 100644
--- a/internal/postgres/insert_module.go
+++ b/internal/postgres/insert_module.go
@@ -222,13 +222,7 @@ func insertModule(ctx context.Context, db *database.DB, m *internal.Module) (_ i
if err != nil {
return 0, err
}
- var (
- moduleID int
- depComment *string
- )
- if m.Deprecated {
- depComment = &m.DeprecationComment
- }
+ var moduleID int
err = db.QueryRow(ctx,
`INSERT INTO modules(
module_path,
@@ -240,9 +234,8 @@ 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,$11)
+ VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)
ON CONFLICT
(module_path, version)
DO UPDATE SET
@@ -258,7 +251,6 @@ func insertModule(ctx context.Context, db *database.DB, m *internal.Module) (_ i
sourceInfoJSON,
m.IsRedistributable,
m.HasGoMod,
- depComment,
version.IsIncompatible(m.Version),
).Scan(&moduleID)
if err != nil {