зеркало из https://github.com/golang/pkgsite.git
751d8c264d
Change-Id: I7beba589459cfbe77af495251901a65ea88ffe98 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/657181 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julieqiu@google.com> |
||
---|---|---|
cmd | ||
content/static | ||
internal | ||
migrations | ||
.gitignore | ||
.prettierrc.yaml | ||
CONTRIBUTING.md | ||
LICENSE | ||
PATENTS | ||
README.md | ||
all.bash | ||
go.mod | ||
go.sum |
README.md
Go Module Discovery Site
Getting Started
Requirements
Migrations
Migrations are managed with the golang-migrate/migrate CLI tool.
To run all the migrations:
migrate -source file:migrations -database "postgres://localhost:5432/discovery-database?sslmode=disable" up
To create a new migration:
migrate create -ext sql -dir migrations -seq <title>
This creates two empty files in /migrations
:
{version}_{title}.up.sql
{version}_{title}.down.sql
The two migration files are used to migrate "up" to the specified version from the previous version, and to migrate "down" to the previous version. See golang-migrate/migrate/MIGRATIONS.md for details.