parent
9fa68a40e1
commit
84139c9321
|
@ -148,7 +148,7 @@ public class FlyWay {
|
||||||
|
|
||||||
try{
|
try{
|
||||||
String ambiente = System.getProperty("ambiente") ==null || System.getProperty("ambiente").isEmpty() ? "" : System.getProperty("ambiente");
|
String ambiente = System.getProperty("ambiente") ==null || System.getProperty("ambiente").isEmpty() ? "" : System.getProperty("ambiente");
|
||||||
if( AMBIENTE_DEV.equalsIgnoreCase(ambiente) || AMBIENTE_CONSULTA.equalsIgnoreCase(ambiente) ) {
|
if( (AMBIENTE_DEV.equalsIgnoreCase(ambiente) && AMBIENTE_CONSULTA.equalsIgnoreCase(ambiente)) && Boolean.FALSE.equals(isReloadFlyway) ) {
|
||||||
log.warn("Flyway não executado. Ambiente = dev ou consulta");
|
log.warn("Flyway não executado. Ambiente = dev ou consulta");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -172,11 +172,10 @@ public class FlyWay {
|
||||||
|
|
||||||
dataSource = flyway.getDataSource();
|
dataSource = flyway.getDataSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Boolean.TRUE.equals(isReloadFlyway)) {
|
execute(flyway);
|
||||||
execute(flyway);
|
log.info("Flyway executado.");
|
||||||
log.info("Flyway executado.");
|
|
||||||
}
|
|
||||||
}catch(Throwable t){
|
}catch(Throwable t){
|
||||||
log.error("Erro ao executar o Flyway",t);
|
log.error("Erro ao executar o Flyway",t);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue