migrations icon indicating copy to clipboard operation
migrations copied to clipboard

CLI executable

Open ilyakaznacheev opened this issue 5 years ago • 3 comments

Does the library have a ready-to-use executable somewhere? To just download&run like

# download and install the executable
go get github.com/go-pg/migrations/cmd/pg-migrations
# run migrations as an app
pg-migrations init
pg-migrations up 2

ilyakaznacheev avatar Jun 25 '19 09:06 ilyakaznacheev

No, because this lib needs database config and requiring everyone to use same CLI, config format and single database does not sound reasonable. Just copy the bits you need from https://github.com/go-pg/migrations/blob/master/example/main.go and use CLI/config you prefer.

vmihailenco avatar Jun 25 '19 09:06 vmihailenco

So why don't implement a simple CLI wrapper to allow new users just install it and use like golang-migrate does?

I don't mean package building or installing with some package manager like brew or apt, but just a standalone CLI app, that will allow to run it without any code manipulation.

ilyakaznacheev avatar Jun 25 '19 09:06 ilyakaznacheev

I have to agree, having a binary would be awesome.

movergan avatar May 21 '20 20:05 movergan