I'm writing a webapp in Go which uses Postgres for data storage and deploy in on Heroku. How can I run migrations automatically?
I use Go 1.13, for dependency management I want to use Go Modules.
As a migration tool I tried this https://github.com/golang-migrate/migrate.
Locally I just downloaded latest binary from github releases and run CLI utility ./migrate -database $DATABASE_URL -path migrations up.
Heroku Procfile content
release: migrate -database $DATABASE_URL -path migrations up
web: bin/myawesomegoapp
Of course, when I launch git push heroku master I get an error, that "migrate" no such file or directory, release command failed and push rejected.
So, how can I set up project to install migrate command to be able to run it on heroku on every release?