Can we have two flyway projects migrate tables to a single target database ?
Antony_Schweitzer
Posts: 1 New member
We have 2 databases in DEV environment but only 1 database in higher environment, So can we create two flyway projects and migrate the tables to a single target database.
Example below,
DEV DB1 - Table A
DEV DB2 - Table B
PROD DB - Table A , Table B
Example below,
DEV DB1 - Table A
DEV DB2 - Table B
PROD DB - Table A , Table B
Tagged:
Answers
Hello Antony_Schweitzer,
What you're describing, could be technically possible, but from a workflow perspective is likely undesirable for reasons I'll explore in a moment. Please could you explain how this would be desirable to you?
I'm assuming you mean two different dev dbs, rather than 2 very similar dbs with minor differences due to pursuing different development branches. If I'm mistaken please say.
As detailed here Flyway Desktop - development database environment configuration
If you have entirely different sources feeding in, you are liable to hit the same type of issues as if you were using shared development since you'll suffer from a lack of visibility of merge conflicts and potentially wiping out beneficial changes downstream.
The preferred format, for both ease of development and accuracy of migrations is each dev to have their own local instance and then committing their resulting changes to a central repository, giving you a single 'source of truth', which then can be applied to your target db.