-
Notifications
You must be signed in to change notification settings - Fork 93
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
rivermigrate using a single connection instead of a pool #659
Comments
Glad you’re liking it! 😀 This might be a tricky thing to implement. The reason is that the migrator works on a driver, and the pgx driver can currently only be initialized with a pool. We might be able to make it work on a conn with some refactoring, though we’d probably want to make sure people can’t use that single conn driver with a River Client because that would likely have some issues and would be a big foot gun. I am definitely open to it if we can figure out a way to address those concerns! |
Ahh, great! The way I see it, to make the Connection could be something as simple as WDYT? |
@roman-vanesyan the migrator needs to continue being able to work with multiple database adapters so I think it's important that it continue operating on an interface like that. It does use a small subset of the driver methods, but certain ones like |
riverPgxDriver := riverpgxv5.New(/* *pgxpool.Pool */)
riverMigrator, err := rivermigrate.New(riverPgxDriver, &rivermigrate.Config{}) I'm able to migrate with a pool on v0.12.1 (I don't see any breaking changes yet) |
Hello!
River is an excellent piece of software, I'm in love with it :)
Recently, I tried to integrate river migration with the migration tooling that uses
pgx/v5
'spgx.Conn
to drive the migration instead of apgxpool.Pool
. Unfortunately, River seems to not supporting it. Previously it supportedpgx.Tx
, but then it was removed.Are you open to add support for
pgx.Conn
/generic single connection?The text was updated successfully, but these errors were encountered: