gleimar 2016-07-21 17:28:57 +00:00
parent 28e8d41822
commit 6d49c2f0f5
1 changed files with 13 additions and 7 deletions

View File

@ -78,13 +78,19 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
private void executeFlyway() {
log.info("Executando Flyway...");
final Flyway flyway = new Flyway();
flyway.setDataSource(getDataSoure());
flyway.setBaselineOnMigrate(true);
flyway.migrate();
try{
final Flyway flyway = new Flyway();
flyway.setDataSource(getDataSoure());
flyway.setValidateOnMigrate(false);
flyway.setIgnoreFutureMigrations(true);
flyway.setOutOfOrder(true);
flyway.setBaselineOnMigrate(true);
flyway.migrate();
}catch(Throwable t){
log.error("Erro ao executar o flyway",t);
}
log.info("Flyway executado.");
}