How does flyway decide order of execution for sql scripts.
I have attached a screenshot of scripts I have in my project in various directories; but it executed it in different order than I expected. Also, the execution order varies if I ran the scripts in incremental manner or all at the same time.
Here's the order I expected them to execute in.

Here's the order they got executed in.

I am using flyway-core 4.0.3 with sprint boot. I have set flyway.out-of-order=true.
Flyway ignores leading zeroes between dots and that's why the order was different than what I expected. Once I removed leading zeroes; the scripts were executed in order I expected.
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