MyBatis migrations splits each SQL file into two sections:
How
This is supported since Flyway 5.0. Sadly it's a commercial only feature though.
https://flywaydb.org/documentation/command/undo