Skip to content

HFJ_RES_VER_PROV might cause migration error on DB that automatically indexes the Primary Key #5126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TynerGjs opened this issue Jul 25, 2023 · 0 comments · Fixed by #5127
Closed
Assignees

Comments

@TynerGjs
Copy link
Contributor

TynerGjs commented Jul 25, 2023

Describe the bug
When updating from hapi-fhir version 6.6.0 to the newest version, data migration will throw error when trying to add index on column RES_PID of HFJ_RES_VER_PROV table since it is already indexed in previous version.

To Reproduce

  1. Run hapi-fhir 6.6.0 with fresh OracleDB 12c. Notice data migration will happen automatically.
  2. Stop hapi-fhir, and replace with newer version (e.g. version 6.7.14) on the same database.
  3. Run hapi-fhir.

Observed behavior

ca.uhn.fhir.jpa.migrate.HapiMigrationException: 
   HAPI-0047: Failure executing task "Add IDX_RESVERPROV_RES_PID index to table HFJ_RES_VER_PROV", aborting! 
   Cause: ca.uhn.fhir.jpa.migrate.HapiMigrationException: HAPI-0061: Failed during task 6.8.0.20230510.2: 
   org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; 
   uncategorized SQLException for SQL [create index IDX_RESVERPROV_RES_PID on HFJ_RES_VER_PROV(RES_PID)]; 
   SQL state [72000]; error code [1408]; ORA-01408: such column list already indexed; nested exception is java.sql.SQLException: ORA-01408: such column list already indexed

Expected behavior
Hapi-fhir Start successfully.

Environment (please complete the following information):

  • HAPI FHIR Version 6.6.0 to version 6.7.14 and above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants