13
votes

We are having many projects running on many servers looking up into one database, we"re thinking to setup Flyway to every project for control our database structure.

But we are worrying about concurrent migration problem, if some projects re-deploy in sametime.( Off-coures, we always take care the "If exist" things in sql syntax )

How Flyway work when concurrent change on same data table or other struture things ?

1

1 Answers

15
votes

It works as expected. See the answer in the FAQ: https://flywaydb.org/documentation/learnmore/faq.html#parallel

Can multiple nodes migrate in parallel?

Yes! Flyway uses the locking technology of your database to coordinate multiple nodes. This ensures that even if multiple instances of your application attempt to migrate the database at the same time, it still works. Cluster configurations are fully supported.