Play evolutions conflicts in a team development

Hey, I’m working on a project based on Play (2.7 + play-slick) for 2 years, and our team is growing. However, project management issues are growing too. So the thing is that default play evolutions plugin is not so comfortable to use in a team.

I have 2 environments: test and prod. Imagine dev1 is working on task A, dev2 working on task B and dev3 working on task C, they all checkout from prod brunch and they all add new evolution scripts (let’s say last evolution is 90.sql). Then imagine they finish tasks in order B, A, C and they all have same migration file 91.sql, so they have to checkout new brunch from test, then pull changes from working brunch, fix migration conflicts and then push changes to test brunch, and if they want to fix some stuff in a working brunch, they have to update test-working brunch.

In Play docs they suggest just to fix conflicts in the same file but it’s inconvenient when you have 3-4 tasks uploaded to test and some of them are ready to be on prod. And when it’s on prod changing same 91.sql migration file could lead to down evolutions or inconsistent state if down evolutions are disabled

We tried to change default evolutions behaviour rewriting it with timestamp in the name but something didn’t work. Are there any other better solutions for it? like having evolution scripts ordered by creation time to avoid any conflicts at any time?

Can you elaborate a little further here? What did you try and what was the problem?

Anyhow, we have a sample application using Flyway DB and that may be a way to go for your team:


thanks, I’ll check Flyway DB

My team facing same problems, so we use custom evolution reader;

like this.

hey, but how does it work? From the code I see the same sorting by numeric file name