commit | 200cf3c0e2211e91df3412fc683d33f018a40581 | [log] [tgz] |
---|---|---|
author | Rob Findley <rfindley@google.com> | Tue Nov 05 15:29:12 2019 -0500 |
committer | Julie Qiu <julie@golang.org> | Fri Mar 27 16:46:47 2020 -0400 |
tree | aedae14ac29464f3a0606846d5a5ed936738cf7b | |
parent | e639c37ff6b7d1e8c96a9a710bd595e07ec0ea6d [diff] |
internal/middleware,etl: add error reporting middleware A new middleware is added that sends an error report whenever the ETL returns a 500 from a scheduled endpoint. Along the way, refactor main() in cmd/etl to be more consistent about resolving dependencies in helper functions. Fixes b/142731446 Change-Id: Ib44cd40bf48a3c229220c8c571e52ee033047aa5 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/592534 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.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.