commit | 8d07fa5e04b708e3146ef8b5948c11904df718fa | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Thu Feb 27 07:30:23 2020 -0500 |
committer | Julie Qiu <julie@golang.org> | Mon Apr 06 15:50:52 2020 -0400 |
tree | 4f51e617ffd7200b3733b5bd8abbcb2289d6a982 | |
parent | 3460441186bf5722823520bd7cf0e20e08ec8826 [diff] |
internal/licenses: upgrade licensecheck, add licenses Upgrade to the latest version of licensecheck. License. Change-Id: Ic9bac6377445738fe6ee2b51b1eda6492126f5d3 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/677785 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.