title: Setting up multiple database with Flyway
body: <p>I am trying to setup two different database with Flyway 5.0.7, MySQL for development and H2 for testing. I have configured both databases in respective files.</p>
  
  <p>For <strong>Development</strong>, <em>src/main/resource/application.properties</em></p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost:3306/moment
  spring.datasource.username=root
  spring.datasource.password=root
  
  flyway.locations=db/migration,db/specific/mysql
  </code></pre>
  
  <p>For <strong>Testing</strong>, <em>src/test/resource/application.properties</em></p>
  
  <pre><code>spring.datasource.driver-class-name=org.h2.Driver
  spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
  spring.datasource.username=sa
  spring.datasource.password=sa
  
  flyway.locations=db/migration,db/specific/h2
  </code></pre>
  
  <p>Below is the folder structure for Flyway migration files</p>
  
  <p><a href="https://i.stack.imgur.com/wI1SA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wI1SA.png" alt="Flyway migration file structure"></a></p>
  
  <p>In this case Flyway is not able to find migration files under <code>specific</code> folder and throws error when applying <code>V1.1__Insert_Records.sql</code> for <code>table not found</code>.</p>
  
  <p>If I move the <code>specific</code> folder inside <code>db/migration</code>, I am getting error for duplicate files of same version.</p>
  
  <p>Any suggestions how should I configure migration files for multiple databases to work with Flyway?</p>