-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate
CLI reports error: no scheme
despite having supplied connection string.
#9
Comments
I got this error solved by providing the |
Anyway it could be an improvement to have more specific messages about what is missing in order to make a migration |
@paveltrufi Thank you for the quick response. I tried your suggestion, to include a
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.
I am closing this, as I believe it to be resolved. Thank you again for your help. |
@mingp If you want the For the ssl issue, try specifying |
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.
|
agreed, terrible error strings for such a popular product, I will take my start back |
Just spend over 2 hours with this error, it MUST be more specific |
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. 🤦♂️ |
Hi all,
I wasn't sure whether this should go into https://github.com/mattes/migrate or here, but my best guess after seeing mattes/migrate#311 this issue was to put it here.
I am experiencing an unexpected error from the
migrate
CLI while following the documentation.I built and installed the
migrate
CLI according to the instructions https://github.com/golang-migrate/migrate/tree/master/cli#with-go-toolchain here. Specifically, I ran the following. (I changed the install directory to~/bin
, but I don't expect that to make a difference.)I can successfully run
migrate -version
. Its output is reproduced below.When I try to run the migrate CLI as below. (Certain values have been redacted for privacy, but the general structure has not changed.)
I get the following error message.
Just to make sure that I didn't make a syntax error somewhere, I ran an example from the doc verbatim, as below. I got the same error message.
Digging briefly into the source code, it appears from
migrate/util.go
Line 55 in 22f2495
error: no scheme
iserrScheme
, which is returned when the parsed URL does not contain a proper scheme. This is unexpected to me. I would expect the scheme to be parsed aspostgres
.Does anyone here have any ideas as to why this is happening? I am willing to help debug further, if anyone has recommendations as to what to try. I hope someone can provide some insight here.
Thank you all in advance.
The text was updated successfully, but these errors were encountered: