migrate up erroring out with sslmode query

Created on 5 Oct 2019  路  4Comments  路  Source: golang-migrate/migrate

Describe the Bug
When trying to run a migration, I get an error that "no matches are found".

Steps to Reproduce
Steps to reproduce the behavior:

  1. One up and down SQL file
  2. migrate -database postgres://localhost/database?sslmode=disable -path db/migrations up
  3. See error

Expected Behavior
Migration to be successful.

Migrate Version
v4.6.2

Loaded Source Drivers
file, s3, github, github-ee, gitlab, go-bindata, godoc-vfs, gcs

Loaded Database Drivers
crdb-postgres, postgres, redshift, spanner, clickhouse, cockroachdb, mongodb, mysql, postgresql, sqlserver, stub, cassandra, cockroach

Go Version
go1.13 darwin/amd64

Stacktrace
zsh: no matches found: postgres://localhost/database?sslmode=disable

Most helpful comment

okay, i kinda figure it out. the issue is not with the migration library. Something to do with ZSH. https://github.com/robbyrussell/oh-my-zsh/issues/31

What i did was to enclose the URL with double quotes

migrate -source file://migrations -database "postgres://localhost/database?sslmode=disable" up 2

Hope this helps!

All 4 comments

Currently experiencing this too. actually, adding any paramters after the database name returns the error too. also on postgres.

okay, i kinda figure it out. the issue is not with the migration library. Something to do with ZSH. https://github.com/robbyrussell/oh-my-zsh/issues/31

What i did was to enclose the URL with double quotes

migrate -source file://migrations -database "postgres://localhost/database?sslmode=disable" up 2

Hope this helps!

that helped! thanks 馃槃

Looks like the issue has been resolved

Was this page helpful?
0 / 5 - 0 ratings