We use structure.sql as base for tests DB in standard way - we configured system to create it every time developers run db:migrate and then they commit structure changes together with the migration.
The problem starts when there are more than one project with migration in staging environment. When deploying developers always have conflicts with each other, mainly because of migrations list at the bottom.
Is there any common solution to this problem?
I thought about creating separate file for each table and migration version, and that way make git manage it in non-conflict way.
Appreciate the advice, but it doesn’t solve the problem. When you deploy to the “global” staging, you’d still have same problem.
I’m coming to think that creating “structure.sql” wasn’t meant to be part of feature branch, but only be created after deployment to production.