title: SpringBoot, Hibernate and flyway db issue
body: <p><strong>updated with rieckpil suggestion</strong> </p>
  
  <p>Hi,</p>
  
  <p>right now I am facing an issue which appears only when I am using a CrudRepository to add/read entities from a H2 DB.</p>
  
  <p>A very basic example which works:</p>
  
  <p>My <strong>properties</strong>:</p>
  
  <pre><code>spring.datasource.url=jdbc:h2:file:~/flyawayTest;DB_CLOSE_ON_EXIT=FALSE;AUTO_RECONNECT=TRUE
  spring.datasource.username=admin
  spring.datasource.password=password
  spring.datasource.driver-class-name=org.h2.Driver
  spring.h2.console.enabled=true
  spring.h2.console.path=/h2
  spring.jpa.show-sql=true
  spring.jpa.hibernate.ddl-auto=validate
  spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
  spring.flyway.baseline-on-migrate = true
  </code></pre>
  
  <p>and an <strong>example class</strong></p>
  
  <pre><code>@Entity
  @Data
  public class User {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      private String username;
  
      public User() {
      }
  
      public User(String username) {
          this.username = username;
      }
  
      public User(String username, long lastLogin) {
          this.username = username;
          //this.lastLogin = lastLogin;
      }
  }
  </code></pre>
  
  <p>Using this <strong>.sql file</strong></p>
  
  <pre><code>CREATE TABLE USER (
    ID bigint(20) NOT NULL AUTO_INCREMENT,
    USERNAME varchar(100) NOT NULL,
    PRIMARY KEY (ID)
  );
  
  insert into USER (USERNAME) values ('User');
  
  ALTER TABLE USER ADD COLUMN LASTLOGIN bigint(20) default 0
  </code></pre>
  
  <p>If I am going to work with a CrudRepository I got the <strong>exception</strong>:</p>
  
  <p><code>Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [last_login] in table [user]</code></p>
  
  <p><strong>Repo</strong></p>
  
  <pre><code>@Repository
  public interface UserRepo extends CrudRepository&lt;User, Long&gt; {
  
  }
  </code></pre>
  
  <p><strong>Helper-Class</strong> to test this procedure</p>
  
  <pre><code>@Component
  public class UCML implements CommandLineRunner {
  
  
      private final UserRepo userRepo;
  
      public UCML(UserRepo userRepo) {
          this.userRepo = userRepo;
      }
  
      @Override
      public void run(String... args) throws Exception {
  
          userRepo.save(new User("TestUser"));
          userRepo.findAll().forEach(System.out::println);
      }
  }
  </code></pre>
  
  <p><strong>V1__baseline.sql</strong> (is empty since it is only used to get a baseline of the DB with consisting user TestUser</p>
  
  <p><strong>V2__migrate.sql</strong></p>
  
  <pre><code>ALTER TABLE USER ADD COLUMN LASTLOGIN bigint(20) default 0
  </code></pre>
  
  <p>My steps are:</p>
  
  <ol>
  <li>Adding a new user <code>userRepo.save(new User("A"));</code> to my empty db</li>
  <li>Shutdown application</li>
  <li>Add the flywaydb dependency to my pom</li>
  <li>create an empty .sql file named <code>V1__baseline.sql</code> to make use of <code>spring.flyway.baseline-on-migrate = true</code> and start the app, success, shutdown</li>
  <li>create a new sql file named <code>V2__migrate.sql</code> with content <code>ALTER TABLE USER ADD COLUMN LASTLOGIN bigint(20) default 0</code></li>
  </ol>
  
  <p>then I add the field <code>private long lastLogin;</code> to the class <code>User</code>.</p>
  
  <p>When I <strong>now</strong> start the application again I get the error I mentioned above </p>
  
  <p><code>Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [last_login] in table [user]</code></p>
  
  <p>So what I do wrong here? </p>