title: How to programmatically trigger flyway migration before spring-boot flyway-ootb migration is executed?
body: <p>In my spring-boot project I'm using out-of-the-box integration for Flyway (<code>org.flywaydb.flyway-core</code>) and have some migration scripts which are executed on startup and managed via default <code>flyway_schema_history</code>-table.</p>
  <p>The project also uses a module bringing its own flyway migration scripts, which are migrated programmatically and keeping track of migrations in an other <code>moduleX_schema_history</code>-table.</p>
  <p>As the migrations of the main-project needs to work on some of the tables created via the modules migration, the module-migration needs to happen before the flyway-plugin migrates the main-projects scripts.</p>
  <p>How can I achieve executing modules migration programmatically and before the main-apllications fly-integration kicks in?
  How and when is the flyway-plugin migration triggered?</p>
  <p>//EDIT:
  I tried to execute code before FlywayAutoConfiguration via a <code>@Configuration</code> class annotated with</p>
  <pre><code>@AutoConfigureBefore({FlywayAutoConfiguration.class})
  @AutoConfigureAfter({DataSourceAutoConfiguration.class})
  </code></pre>
  <p>but unfortunatly the class is still instanciated after <code>FlywayAutoConfiguration</code>.</p>
  <p>//EDIT:
  I asked the related (more general) question how to order AutoConfiguration from modules, too <a href="https://stackoverflow.com/questions/63135799/how-to-use-autoconfigureorder-in-a-spring-boot-configuration-class-from-a-modul">How to use @AutoConfigureOrder in a spring boot configuration class from a module - Stack Overflow</a></p>