parent
9fa68a40e1
commit
84139c9321
|
@ -148,7 +148,7 @@ public class FlyWay {
|
|||
|
||||
try{
|
||||
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");
|
||||
return true;
|
||||
}
|
||||
|
@ -173,10 +173,9 @@ public class FlyWay {
|
|||
dataSource = flyway.getDataSource();
|
||||
}
|
||||
|
||||
if(Boolean.TRUE.equals(isReloadFlyway)) {
|
||||
execute(flyway);
|
||||
log.info("Flyway executado.");
|
||||
}
|
||||
|
||||
}catch(Throwable t){
|
||||
log.error("Erro ao executar o Flyway",t);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue