title: Why does my FlywayMigrationStrategy call afterMigrate.sql twice?
body: <p>I work on a Spring-boot project and use Flyway for database migration.
  While working in dev-profile I want to fill the database with dummy data.
  In order to have the exact same initial data values I overrode the FlywayMigrationStrategy Bean so that it performs a flyway.clean() before the migration starts:</p>
  
  <pre><code>@Bean
  @Profile("dev")
  public FlywayMigrationStrategy cleanMigrateStrategy() {
      FlywayMigrationStrategy strategy = new FlywayMigrationStrategy() {
          @Override
          public void migrate(Flyway flyway) {
              flyway.clean();
              flyway.migrate();
          }
      };
  
      return strategy;
  }
  </code></pre>
  
  <p>My Migration folder contains several versioned migration scripts and ONE afterMigrate callback script which adds data to the created Tables.</p>
  
  <p><a href="https://i.stack.imgur.com/AAZcB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AAZcB.png" alt="enter image description here"></a></p>
  
  <p>The problem now is, the afterMigrate.sql script gets called two times as you can see from the following log:</p>
  
  <pre><code>2017-07-03 13:12:42.332  INFO 23222 --- [           main] o.f.core.internal.command.DbClean        : Successfully cleaned schema "PUBLIC" (execution time 00:00.031s)
  2017-07-03 13:12:42.397  INFO 23222 --- [           main] o.f.core.internal.command.DbValidate     : Successfully validated 4 migrations (execution time 00:00.044s)
  2017-07-03 13:12:42.413  INFO 23222 --- [           main] o.f.c.i.metadatatable.MetaDataTableImpl  : Creating Metadata table: "PUBLIC"."schema_version"
  2017-07-03 13:12:42.428  INFO 23222 --- [           main] o.f.core.internal.command.DbMigrate      : Current version of schema "PUBLIC": &lt;&lt; Empty Schema &gt;&gt;
  2017-07-03 13:12:42.430  INFO 23222 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "PUBLIC" to version 1 - create users
  2017-07-03 13:12:42.449  INFO 23222 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "PUBLIC" to version 2 - create address
  2017-07-03 13:12:42.464  INFO 23222 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "PUBLIC" to version 3 - create patient case
  2017-07-03 13:12:42.475  INFO 23222 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "PUBLIC" to version 4 - state machine
  2017-07-03 13:12:42.498  INFO 23222 --- [           main] o.f.core.internal.command.DbMigrate      : Successfully applied 4 migrations to schema "PUBLIC" (execution time 00:00.086s).
  2017-07-03 13:12:42.499  INFO 23222 --- [           main] o.f.c.i.c.SqlScriptFlywayCallback        : Executing SQL callback: afterMigrate
  2017-07-03 13:12:42.502  INFO 23222 --- [           main] o.f.c.i.c.SqlScriptFlywayCallback        : Executing SQL callback: afterMigrate
  2017-07-03 13:12:42.917  INFO 23222 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
  </code></pre>
  
  <p>If I remove the flyway.clean() function call it gets called only once.</p>
  
  <p>Can somebody tell me why its called twice when I call flyway.clean() and flyway.migrate() and how to prevent the second call?</p>