sql-migrate icon indicating copy to clipboard operation
sql-migrate copied to clipboard

Migrate transactions for multiple shards

Open musinit opened this issue 2 years ago • 7 comments

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

musinit avatar Jun 04 '23 09:06 musinit

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

musinit avatar Jun 05 '23 18:06 musinit

How will that impact existing users?

rubenv avatar Jun 19 '23 09:06 rubenv

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

musinit avatar Jun 29 '23 06:06 musinit

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.

rubenv avatar Jun 29 '23 07:06 rubenv

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, ...

musinit avatar Jun 29 '23 07:06 musinit