commit | 749928854a6a8a933d128b27d29c711239f1fe88 | [log] [tgz] |
---|---|---|
author | Julie Qiu <julie@golang.org> | Mon Jun 24 23:04:39 2019 -0400 |
committer | Julie Qiu <julie@golang.org> | Fri Mar 27 16:46:39 2020 -0400 |
tree | e6eff02fddd4875b8bacf429c7f666295d92d5a5 | |
parent | 2d670e88334c3c0f5210e0eaa464cda010c2d7fc [diff] |
internal/derrors: create NotAcceptable error Change-Id: I8a12317234d891a4d300402955ce167362448ca2 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/494244 Reviewed-by: Robert Findley <rfindley@google.com>
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.