I use flyway for SQL migration, sql transition worked fine for me.
Now I'm trying to perform a simple Java migration using Flyway, below is the code that is used
package db.migration; import org.flywaydb.core.api.migration.jdbc.JdbcMigration; import java.sql.Connection; import java.sql.PreparedStatement; public class V2__Test implements JdbcMigration { public void migrate(Connection connection) throws Exception { PreparedStatement statement = connection.prepareStatement("create table test (id int)"); try { statement.execute(); } finally { statement.close(); } } }
I created a Jar file from this class file and put the Jar file in the Flyway_home / Jars folder. Later I mentioned db / migration in the configuration file as shown below
flyway.locations=db.migration
After that, I ran the migrate command from cmd utility as shown below
flyway -configFile=conf/flyway-fte-Data.conf migrate
we get the following error
ERROR: Unable to scan for SQL migrations in location: classpath:db/migration
What is missing here can someone help me fix this.
Note. I do not use any plugin, its command line utility is just for passing.
Thanks in advance.
source share