Skip to content
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 transactions for multiple shards #246

Open
musinit opened this issue Jun 4, 2023 · 5 comments
Open

Migrate transactions for multiple shards #246

musinit opened this issue Jun 4, 2023 · 5 comments

Comments

@musinit
Copy link

musinit commented Jun 4, 2023

It would be nice to support multiple hosts for migration, so it's possible to apply migration for sharded databases.

@musinit
Copy link
Author

musinit commented Jun 5, 2023

@rubenv what do you think? :) I can suggest the MR

@rubenv
Copy link
Owner

rubenv commented Jun 19, 2023

How will that impact existing users?

@musinit
Copy link
Author

musinit commented Jun 29, 2023

I would make this feature optional, so no impact on those who don't need it

@rubenv
Copy link
Owner

rubenv commented Jun 29, 2023

What would we need to add/change?

The thing I'm trying to evaluate is whether this should be part of sql-migrate, or part of something that uses sql-migrate as a building block.

@musinit
Copy link
Author

musinit commented Jun 29, 2023

What if we do it the same way, as multihost connection string works?
datasource: postgresql://node1:port1,postgresql://node2:port2

than would allow multihosting for master/slave PG migrations + can work the same way for all shards.
I am not sure that it's good to mix multihost connection string with different shards, maybe it's better to implement it with separate config option, like datasources: source1, source2, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants