Let's say I have migrations script from V1_1
to V1_300
- it is quite a huge number and takes very long period of time. But from time to time there is a release - can I, from the point of flyway, somehow merge all those migrations so:
V1_1
to V1_300
will be in one file (for instance: V2_1
)Checking for overlaps manually is really time-consuming. Thank you in advance for your answers.
We had the same problem on my project and decided to do a roll up of versions already deployed to production. To roll up incremental changes into 1 file, I ran the migration from scratch in a database then dump (export) back the whole database in 1 SQL file.
I named the file using the last version of the migration. In your case V1_300__rollup.sql
. Then you can continue adding new versions: V2_1
, V2_2
, etc. and repeat when you want to roll up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With