I've a problem with the Flyway schema upgrader for Spring. Following code exists in my servlet.xml
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost/database"/>
<property name="username" value="root"/>
<property name="password" value="password"/>
</bean>
<bean id="flyway" class="com.googlecode.flyway.core.Flyway" init-method="migrate" depends-on="dataSource">
<property name="dataSource" ref="dataSource"/>
</bean>
But how to set the migration script directory or rather whats the default directory?
Everything is explained in the excellent documentation:
If you want to alter the default directory (which is
db/migration
as shown on the picture above), I believe this should work (see:Flyway.setBaseDir()
):