Skip to content

Commit

Permalink
migrations: add deprecated_comment column to modules table
Browse files Browse the repository at this point in the history
Add a column to the modules table that will hold
the "Deprecated" comment from the go.mod file.

For golang/go#41321

Change-Id: I6bce20ef6a84d6e33ed60811945f90930ae25a09
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/290033
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>
  • Loading branch information
jba committed Feb 8, 2021
1 parent 2d07e2e commit 72b4ab8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions migrations/000063_add_deprecated.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Copyright 2021 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.

BEGIN;

ALTER TABLE modules DROP COLUMN deprecated_comment;

END;
12 changes: 12 additions & 0 deletions migrations/000063_add_deprecated.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- Copyright 2021 The Go Authors. All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.

BEGIN;

ALTER TABLE modules ADD COLUMN deprecated_comment TEXT;

COMMENT ON COLUMN modules.deprecated_comment IS
'COLUMN deprecated_comment holds the "Deprecated" comment from the go.mod file, if any.';

END;

0 comments on commit 72b4ab8

Please sign in to comment.