KB Article #187220
Migrating Portal from 2.4 SP21 to FAH 3.0 U6 or lower
Problem
In Portal 2.4-SP21 we delivered a script that creates an index named IDX_TASK_STATUS on TASK STATUS.
The index was previously created in version 3.0-U3. As a result, when attempting to migrate from version 2.4.0-SP21 to any 3.0 version ranging from U3 to U6, Portal encounters an issue where it attempts to create an index that already exists. This causes the Flyway migration to fail with the following error:
ERROR Catalina-utility-1 org.springframework.boot.SpringApplication - Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [com/axway/ais/portal/core/settings/DataSourceConfig.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected applied migration not resolved locally: 2.4.0.21
If the migration from version 2.4 is performed from an SP version lower than SP21, everything functions correctly.
Resolution
This issue will be resolved in version 3.0 U7.
In the interim, to prevent issues during migrations from version 2.4-SP21 to FAH 3.0 U3-U6, please follow these steps:
- Before the migration, execute the attached script “workaround.sql” on the Portal schema. After executing the script:
- The entry corresponding to the SP21 script version will be deleted from the flyway_schema_history table.
- The created index will be dropped.
- Restart the server
Migrations from SP22 onwards are not affected, as by the time SP22 is available and tested, U7 will already have been released. If the migration is performed to version 3.0 U7 or later, this procedure is unnecessary.