Comments (8)
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.
Anyway it could be an improvement to have more specific messages about what is missing in order to make a migration
from migrate.
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.
I got this error solved by providing the -path
argument pointing to the directory where all the SQL scripts were stored
from migrate.
@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.
@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.
Just spend over 2 hours with this error, it MUST be more specific
from migrate.
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)
- Migrations that begin with the year 2024 fail during the 'up' migration process HOT 7
- How to run up/down migration before service starts?
- pgx not following intended import behaviour HOT 1
- Unable to change delimiter in mysql migrations HOT 1
- Support for libsql and Turso HOT 1
- "unexpected EOF" when connecting to MySQL DB via cloud-sql-proxy in github actions
- clickhouse TLS support is missing fir https://github.com/golang-migrate/migrate/blob/master/database/clickhouse/clickhouse.go
- Maintainer support for PR Backlog
- Allow users to fail when there are bad migration paths in their source HOT 3
- Expensive SQL query inside ensureVersionTable & ensureLockTable
- imported mongo official driver is out of date
- `Dirty database version 1. Fix and force version` and `error: can't read limit argument N` HOT 2
- SQLite3 accepts file URL with prefix `file:///`, but golang-migrate requires prefix `sqlite3:///`. Not flexible. HOT 1
- Do not return an error when no change. Communicate error conditions using errors.
- golang-migrate ignores PostgresSQL message reporting
- error: no migration found for version X (some numbers) HOT 1
- Cassandra multiple hosts cluster migrations failed HOT 1
- Install on Ubuntu with apt HOT 1
- Postgres / SQL multistatement support
- first .: file does not exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from migrate.