[mirror] Home of the pkg.go.dev website
Перейти к файлу
Julie Qiu b8bb5b03f7 migrations: add NOT NULL constraint to versions.commit_time
Change-Id: If38eb3cdfebd1ea960280830a64a61fc8db5d6f7
Reviewed-on: https://team-review.git.corp.google.com/c/424249
Reviewed-by: Channing Kimble-Brown <ckimblebrown@google.com>
2020-03-27 16:46:33 -04:00
internal internal/fetch: implement parse url for fetch service 2020-03-27 16:46:33 -04:00
migrations migrations: add NOT NULL constraint to versions.commit_time 2020-03-27 16:46:33 -04:00
.gitignore discovery: create proxy for testing; add .DS_Store to .gitignore 2020-03-27 16:46:33 -04:00
CONTRIBUTING.md discovery: add CONTRIBUTING.md 2020-03-27 16:46:33 -04:00
LICENSE discovery: update LICENSE formatting 2020-03-27 16:46:33 -04:00
PATENTS discovery: initial boilerplate 2019-01-28 17:05:04 -05:00
README.md discovery: created initial models 2020-03-27 16:46:28 -04:00
go.mod internal/fetch: implement get packages from a module zip 2020-03-27 16:46:33 -04:00
go.sum internal/fetch: implement get packages from a module zip 2020-03-27 16:46:33 -04:00

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.