Giter Site home page Giter Site logo

Comments (8)

mingp avatar mingp commented on May 19, 2024 22

@dhui

Thank you for the information. I tried your suggestion, and it worked.

For future reference, in case anyone else comes across this with the same issue, the command I used was as follows.

migrate -database "postgres://redacted:[email protected]:5432/redacted?sslmode=disable" -path "./migrations/" up 1 

from migrate.

pavel-kalmykov avatar pavel-kalmykov commented on May 19, 2024 8

Anyway it could be an improvement to have more specific messages about what is missing in order to make a migration

from migrate.

glebarez avatar glebarez commented on May 19, 2024 8

Anyway it could be an improvement to have more specific messages about what is missing in order to make a migration

agreed, terrible error strings for such a popular product, I will take my start back

from migrate.

pavel-kalmykov avatar pavel-kalmykov commented on May 19, 2024 4

I got this error solved by providing the -path argument pointing to the directory where all the SQL scripts were stored

from migrate.

mingp avatar mingp commented on May 19, 2024 1

@paveltrufi

Thank you for the quick response.

I tried your suggestion, to include a -path argument. The command I am now running is as follows. This no longer encounters the error: no scheme error.

migrate -database postgres://redacted:[email protected]:5432/redacted -path ./migrations up 1

In retrospect, that error message was confusing. I will try to look deeper into why it reports that error message for a different underlying error.

Actually, I am still encountering an error, albeit a different one now. The error message is as follows, included here just for completeness. Although, this time, I'm inclined to believe the error message is legitimate, and the underlying issue is that the default Postgres install using Homebrew has no SSL certificate.

error: pq: SSL is not enabled on the server

I am closing this, as I believe it to be resolved. Thank you again for your help.

from migrate.

dhui avatar dhui commented on May 19, 2024

@mingp
If you install the migrate CLI via the Go toolchain, the version will be "dev". This is because versions are managed using git tags. See: our Makefile
We could start tracking version numbers in the code as well, but that allows for inconsistencies.

If you want the migrate binary to report the correct SemVer, you'll need to download the binaries from the release page or from package cloud

For the ssl issue, try specifying sslmode=disable in your connection string. For more info about the connection string, checkout the pq docs

from migrate.

arkhamvm avatar arkhamvm commented on May 19, 2024

Just spend over 2 hours with this error, it MUST be more specific

from migrate.

praneetloke avatar praneetloke commented on May 19, 2024

In my case, it was because I was accidentally encoding the entire DB URL instead of just the password as per https://github.com/golang-migrate/migrate#database-urls. 🤦‍♂️

from migrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.