mbien commented on code in PR #182:
URL: https://github.com/apache/roller/pull/182#discussion_r3955289055


##########
app/src/main/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java:
##########
@@ -254,6 +256,10 @@ public void upgradeDatabase(boolean runScripts) throws 
StartupException {
             // make sure the database version is the exact version
             // we are upgrading too.
             updateDatabaseVersion(con, myVersion);
+            if (!schemaChangesRequired) {
+                successMessage("No table changes were required.");
+            }
+            successMessage("Database version updated to " + myVersion + ".");

Review Comment:
   probably ok for now but this is also a bit brittle.
   
   I think this pattern would be more future proof.
   
   ```java
       boolean upgraded = false;
   
       if(dbversion < xx) {
           upgradeTo...()
           dbversion = yy;
           upgraded = true;
       }
       (...)
   
      if (!upgraded) { extraMessage(); }
   ```
   But this can be tweaked for the next release.



-- 
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