It looks like you could accomplish this using recurring migrations .
I do not think flyway supports external script calls, such as the \ i operator. If you want to try importing a route, you can use placeholders for your scripts.
Using your example, use placeholder in your sql migration file
${my_view}
When calling flyway, determine the value of replacing the placeholder with text from your views / my _view.sql. I'm not sure what you use to call flyway, but in ant it will be something like
<loadfile property="flyway.placeholder" srcfile="views\my_view.sql"/> <flyway:migrate> <locations> <location path="database/migrations"/> </locations> <placeholders> <placeholder name="my_view" value="${flyway.placeholder}"/> </placeholders> </flyway:migrate>
The documentation also has an example: https://flywaydb.org/documentation/ant/migrate
fishy source share