title: Migration of schema PUBLIC to version 1.2 failed
body: <p>Am writing <strong>swing database application</strong> in <strong>springToolset</strong>-eclipse based IDE and <strong>maven</strong>. so here is my simple db connection code and migrate it with flyway.</p>
  
  <p><strong>Main class</strong></p>
  
  <pre><code>    public static void main(final String[] args) throws SQLException {
          final BasicDataSource ds = new BasicDataSource();
          ds.setDriverClassName("org.h2.Driver");
          ds.setUrl("jdbc:h2:target/db");
          ds.setUsername("root");
          ds.setPassword("");
  
          try {
            final Flyway flyway = new Flyway();
            flyway.setDataSource(ds);
            flyway.migrate(); // line no :12
      }}
  </code></pre>
  
  <p><strong>Schema_name</strong> as per flyway(2.2.1) standard is : </p>
  
  <blockquote>
    <p>V1__init_db.sql</p>
  </blockquote>
  
  <p>And when i run this code i got this error :</p>
  
  <pre><code>  Exception in thread "main" com.googlecode.flyway.core.api.FlywayException: 
  Migration of schema "PUBLIC" to version 1.2 failed! Please restore backups and roll back database and code!
          at com.googlecode.flyway.core.command.DbMigrate.migrate(DbMigrate.java:199)
          at com.googlecode.flyway.core.Flyway$1.execute(Flyway.java:872)
          at com.googlecode.flyway.core.Flyway$1.execute(Flyway.java:819)
          at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1200)
          at com.googlecode.flyway.core.Flyway.migrate(Flyway.java:819)
          at com.swdb.exApp.Main.main(12)
  </code></pre>
  
  <p>any one knows what is the error.please help.
  and also this is a tutoiral from <strong>Alber Attard</strong> <a href="http://www.javacreed.com/simple-java-database-swing-application/" rel="nofollow">here</a></p>