golang-migrate

Database migration tool supporting multiple database backends

brewmacoslinux
Try with needOr install directly
Source

About

Database migrations CLI tool

Commands

migrate

Examples

Create a new migration with up and down files$ migrate create -ext sql -dir db/migrations -seq init_schema
Apply all pending migrations to PostgreSQL database$ migrate -path db/migrations -database postgresql://user:pass@localhost/dbname up
Rollback the last migration$ migrate -path db/migrations -database postgresql://user:pass@localhost/dbname down 1