Migrating flyway schema to different database
UserPersonName
Posts: 1 New member
I have two separate databases that I would like to consolidate their versions. The schemas match between database A and database B, but database B does not have the flyway schema history. The first database has a schema history for versions 1 through version 300, but I wish to have the schema history to start with a fresh version 1. I read on baselining, but I do not think that would resolve the issue the baseline script it did not appear in the schema history table.
Another thought I had would be to continue both with version 301 and have database B ignore needing versions 1 - 300. Does flyway have this functionality or is there another method I need to go down?
Another thought I had would be to continue both with version 301 and have database B ignore needing versions 1 - 300. Does flyway have this functionality or is there another method I need to go down?
Tagged:
Answers
Yes the baseline functionality is for exactly this scenario, please see the following resources.
Command: https://flywaydb.org/documentation/command/baseline
Example: https://flywaydb.org/documentation/usage/commandline/baseline
Config parameter: https://flywaydb.org/documentation/configuration/parameters/baselineVersion