Can't use `pgroll` for database migrations
Hi! I fell a bit in love with your project to be honest. Thanks for the great work so far.
Anyway. I'm trying to create a template to make project setup for my future projects easier. I wanted to use pgroll for database migrations and I'm a bit stuck there.
The problem is that pgroll doesn't seem to like the proxy. It applies the migrations if I use it directly on the database, but it gives me an error if I use it on the proxy.
The logs of the proxy also don't seem to be very helpful.
I first initialized pgroll using the pgroll init command directly on the database (gives the same error if used on the proxy)
Then I run the following command:
pgroll --postgres-url "postgresql://postgres:proxy_password@localhost:65432/postgres?sslmode=disable" start example.json
And I get this error
Error: driver: bad connection
Logs of the proxy service look like this:
offshore-stack-electric-1 | 08:57:12.122 pid=<0.3418.0> proxy_session_id=5 [warning] Not validating user "postgres"
offshore-stack-electric-1 | 08:57:12.122 pid=<0.3418.0> proxy_session_id=5 [info] Initialising injector in capture mode %Electric.Postgres.Proxy.Injector.Electric{}
offshore-stack-electric-1 | 08:57:12.127 pid=<0.3418.0> proxy_session_id=5 [info] Upstream connection is ready to accept queries
This repo can be used to reproduce: https://github.com/davemaier/offshore-template/tree/bug/pgroll-not-working
Thanks!
@davemaier pgroll uses shadow columns(https://news.ycombinator.com/item?id=37753511) in a similar way to #668 special support would be needed to support that in the proxy.
Thanks for checking that. I'll be watching the other issue.
👋 we've been working the last month on a rebuild of the Electric server over at a temporary repo https://github.com/electric-sql/electric-next/
You can read more about why we made the decision at https://next.electric-sql.com/about
We're really excited about all the new possibilities the new server brings and we hope you'll check it out soon and give us your feedback.
We're now moving the temporary repo back here. As part of that migration we're closing all the old issues and PRs. We really appreciate you taking the time to investigate and report this issue!