snoopdave opened a new pull request, #184: URL: https://github.com/apache/roller/pull/184
Follow-up to @mbien's review on #182. `DatabaseInstaller.upgradeDatabase` decided whether to print "No table changes were required." from a hardcoded `boolean schemaChangesRequired = dbversion < 610;`. That constant is the last version with a migration script, so it has to be bumped by hand on every future schema change or the message goes wrong. This adopts the pattern Michael suggested: a `schemaUpgraded` flag set inside each `if (dbversion < XXX)` upgrade block, with the message printed when `!schemaUpgraded`. The behavior is unchanged — at that point `dbversion` is already `< myVersion` and `>= 310`, so `dbversion < 610` is true exactly when one of the upgrade blocks runs — but the "did a schema step run?" answer is now derived rather than hardcoded, and the guiding comment tells the next maintainer to set the flag. Also adds a test for the schema-change path (a 520 database upgrading through the 520→610 step, asserting the "no changes" message is suppressed) next to the existing version-only case. Validation: JDK 11 targeted run green (`DatabaseInstallerUpgradeTest`, 2 tests, 0 failures). https://claude.ai/code/session_015X69HHQ5XnjRkJP8ymzwFf -- 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]
