Corrected the DB upgrade scripts #807#823
Conversation
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
WalkthroughThis PR updates the registration version-upgrade mapping configuration in spring.properties, renaming and reordering version keys, and relocates a database schema migration (adding/dropping the CA_CERT_TYPE column) from version 1.3.0-B2 to 1.3.0, while marking 1.2.0.2 as a no-op migration. ChangesVersion Upgrade Mapping and Migration Relocation
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@registration/registration-services/src/main/resources/spring.properties`:
- Around line 10-15: The version-mapping entry in spring.properties must keep
every key that has ever been released, because
SoftwareUpdateHandler.executeSqlFile relies on
versionMappings.containsKey(previousVersion) to skip already-applied migrations.
Preserve the existing keys in
mosip.registration.verion.upgrade.version-mappings, especially any released
version identifiers, and if ordering needs to change update releaseOrder rather
than deleting or renaming the key so previously deployed clients still resolve
previousVersion correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e3e6f090-ab3c-4515-bd29-f00744b5c4ad
📒 Files selected for processing (7)
registration/registration-services/src/main/resources/spring.propertiesregistration/registration-services/src/main/resources/sql/1.2.0.2/initial_db_scripts.sqlregistration/registration-services/src/main/resources/sql/1.2.0.2/rollback_scripts.sqlregistration/registration-services/src/main/resources/sql/1.3.0-B2/initial_db_scripts.sqlregistration/registration-services/src/main/resources/sql/1.3.0-B2/rollback_scripts.sqlregistration/registration-services/src/main/resources/sql/1.3.0/initial_db_scripts.sqlregistration/registration-services/src/main/resources/sql/1.3.0/rollback_scripts.sql
💤 Files with no reviewable changes (2)
- registration/registration-services/src/main/resources/sql/1.3.0-B2/rollback_scripts.sql
- registration/registration-services/src/main/resources/sql/1.3.0-B2/initial_db_scripts.sql
Summary by CodeRabbit
New Features
Bug Fixes