mattes / migrate

Database migrations. CLI and Golang library.
Other
2.29k stars 326 forks source link

build with 'mysql' tags, but it is still postgres #315

Open LiehuoChen opened 6 years ago

LiehuoChen commented 6 years ago

I did go build -tags 'postgres' -o /usr/local/bin/migrate github.com/mattes/migrate/cli, but it seems it still in postgres So when I did 'migrate -verbose -source ./migrations -database mysql://root@127.0.0.1:3306/name_db?query up 2017/11/27 16:49:54 error: no scheme ` The complaints 'no scheme' errors is coming form postgress cli. Is there any steps I need to do beside the cli install docs: https://github.com/mattes/migrate/tree/master/cli

Thanks.

kron4eg commented 6 years ago

@LiehuoChen but your -tags... it's actually 'postgres' :)

chichivica commented 6 years ago

But in some cases one can meet the same error even with correct -tags

That is because missunderstanding -source tag.

For local folder you should use either file://./migrations or -path ./migrations