Describe the Bug
I wanted to test go-migrate with PostgreSQL but apparently SSL is enforced all the time.
Steps to Reproduce
Steps to reproduce the behavior:
Expected Behavior
I wanted to test migrate with a local PostgreSQL but unfortunately I cannot connect with disabled SSL.
Migrate Version
v4.5.0 obtained from homebrew.
Loaded Source Drivers
Source drivers: github-ee, gitlab, go-bindata, godoc-vfs, gcs, file, s3, github
Loaded Database Drivers
Database drivers: cockroach, crdb-postgres, mongodb, mysql, sqlserver, stub, cassandra, clickhouse, cockroachdb, postgres, postgresql, redshift, spanner
Go Version
go version go1.12.1 darwin/amd64
Reading through the PostgreSQL documentation made it more clear to me to use the sslmode=disabled parameter. Maybe this should be outlined in the docs of the CLI.
The docs could use some reorganization.
We could call out how DSNs/connection strings are dependent on the DB being used in the CLI docs.
@Fohlen Feel free to open a PR with doc changes
migrate -source file://db/migrations/up -database postgres://testing:testing@localhost:5432/testing?sslmode=disabled up
Sslmode query param not working for me
You must use double quote for the db URL, like this:
migrate -source file://./sql/migrations -database "postgres://postgres:@localhost:54321/mydb?sslmode=disable" version
Most helpful comment
Reading through the PostgreSQL documentation made it more clear to me to use the
sslmode=disabledparameter. Maybe this should be outlined in the docs of the CLI.