What are the challenges you face when working across database platforms? Take the survey
Options

Can we have two flyway projects migrate tables to a single target database ?

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
  
Tagged:

Answers

  • Options

    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.

    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file