Hello,
We are experiencing an issue while upgrading Sonatype Nexus Repository from version 3.87.1 to 3.98.3.
Environment:
-
Product: Sonatype Nexus Repository
-
Current version: 3.87.1
-
Target version: 3.98.3
-
Deployment: Kubernetes
-
Database: Embedded H2
-
Upgrade path: 3.64.0 → 3.87.1 → 3.98.3
Problem:
Nexus Repository 3.87.1 starts and works correctly. However, after upgrading to version 3.98.3, the application fails to start because database migration 2.102 fails.
The error message is:
Validate failed: Migrations have failed validation.
Detected failed migration to version 2.102
(SearchTablePathsColumnJsonMigrationStep_2_102).
Please remove any half-completed changes then run repair to fix the schema history.
After investigating the database, we found that:
-
The
PUBLIC.SEARCH_COMPONENTStable exists. -
The table does not contain the
PATHScolumn. -
Migration
SearchTablePathsColumnJsonMigrationStep_2_102attempts to execute the following SQL statement:
ALTER TABLE search_components
ALTER COLUMN paths SET DATA TYPE JSON;
- The migration does not appear to create the missing
PATHScolumn before changing its data type.
Questions:
-
Is this a known issue in Nexus Repository 3.98.3?
-
Why is the
PATHScolumn missing after upgrading to version 3.87.1? -
Is manually adding the
PATHScolumn before upgrading to 3.98.3 a safe and supported workaround? -
What is the recommended procedure to fix the failed migration and complete the upgrade?
-
Should Flyway repair be executed in this situation?
This issue was reproduced in an isolated test environment using a copy of our production database. Our production instance is currently running normally and has not been affected.
We would appreciate any guidance or recommendations from the Sonatype team.
Thank you!