commit | 6fbe3484f64de937b112be96f2aba58a5c9e19cf | [log] [tgz] |
---|---|---|
author | Julie Qiu <julie@golang.org> | Tue Jan 07 15:30:18 2020 -0500 |
committer | Julie Qiu <julie@golang.org> | Fri Mar 27 16:46:50 2020 -0400 |
tree | 3100ff1f7395db19bdb1a2d2c5126e6559c4ff83 | |
parent | 2f25f2cf5fe7758ce61849c183c5ec4e6f1a8ac2 [diff] |
internal/middleware: add experiment query param An experiment query param is added, so that it is possible to use features that are not fully rolled out. Fixes b/147293370 Updates b/146052411 Change-Id: I21167faf10294332aedceb060384da088a99d72c Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/632086 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> 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.