commit | 66ad1f1dbeac0aaaaadca678cb404c742729f8a4 | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Mon Feb 24 16:28:22 2020 -0500 |
committer | Julie Qiu <julie@golang.org> | Mon Apr 06 15:50:52 2020 -0400 |
tree | 69e328645f113d9a3a48faac696c70acdfd650d0 | |
parent | 30d17fecd83f58e602b0fd0642f5bbfb56ce10ef [diff] |
all: rename VersionInfo to ModuleInfo This CL is pure renaming: - internal.VersionInfo to internal.ModuleInfo - related variables from vi to mi Updates b/150143758. Change-Id: I5da63a07d6f9b731016ffe92e403e5f2d9aadab7 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/673875 Reviewed-by: Julie Qiu <julieqiu@google.com> CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.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.