commit | 67cc71a6890b896dd5c75f25f1b52efc48313b51 | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Wed Feb 26 05:14:09 2020 -0500 |
committer | Julie Qiu <julie@golang.org> | Mon Apr 06 15:50:52 2020 -0400 |
tree | bc6a19f20af95f9a94ba0b5a0c1784929bd835d2 | |
parent | a6ac6c2d746e9126f6ad7d8e918674a0c81824ba [diff] |
all: rename internal.Version to internal.Module Rename the type, and any variable of that type. Rename most functions from *Version* to *Module*, where it made sense. No other changes. Updates b/150143758. Change-Id: I13079411376be0af7e53a577fc6ca1c92c38b6cd Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/677160 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Julie Qiu <julieqiu@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.