galovics commented on code in PR #2288:
URL: https://github.com/apache/fineract/pull/2288#discussion_r855090016


##########
fineract-provider/src/main/resources/application.properties:
##########
@@ -99,7 +99,7 @@ 
spring.datasource.hikari.dataSourceProperties['dumpQueriesOnException']=${FINERA
 spring.jpa.open-in-view=false
 
 # Liquibase configuration
-spring.liquibase.enabled=true
+spring.liquibase.enabled=${FINERACT_MODE_WRITE_ENABLED:true}

Review Comment:
   I don't think we need this since the check is already present in the code.



##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.java:
##########
@@ -70,6 +70,9 @@ public TenantDatabaseUpgradeService(final 
TenantDetailsService detailsService,
     public void afterPropertiesSet() throws Exception {
         if (databaseStateVerifier.isLiquibaseDisabled()) {
             LOG.warn("Liquibase is disabled. Not upgrading any database.");
+            if (!this.fineractProperties.getMode().isWriteEnabled()) {
+                LOG.warn("Liquibase is disabled, because the 
`FINERACT_MODE_WRITE_ENABLED` environment variable is set to false.");

Review Comment:
   Just styling, I think we can leave out the `this`
   Plus, probably it makes more sense to show an environment variable name 
indepdenent message to the users in case it changes in the future; like 
"Liquibase is disabled because the current instance is configured as a 
non-write Fineract instance".
   What do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to