Fixes broken Oracle migration (#4933)
This commit is contained in:
parent
93a4a7bb33
commit
970befad90
|
@ -122,11 +122,14 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|||
.online(false)
|
||||
.withColumns("TAG_TYPE", "TAG_CODE", "TAG_SYSTEM", "TAG_ID", "TAG_VERSION", "TAG_USER_SELECTED");
|
||||
|
||||
// This migration is failing in Oracle because there is already an index created on column RES_VER_PID since it is a primary key.
|
||||
// IDX_RESVERPROV_RESVER_PID is removed in 20230523.1
|
||||
version
|
||||
.onTable("HFJ_RES_VER_PROV")
|
||||
.addIndex("20230510.1", "IDX_RESVERPROV_RESVER_PID")
|
||||
.unique(false)
|
||||
.withColumns("RES_VER_PID");
|
||||
.withColumns("RES_VER_PID")
|
||||
.failureAllowed();
|
||||
|
||||
version
|
||||
.onTable("HFJ_RES_VER_PROV")
|
||||
|
@ -151,6 +154,10 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|||
.toColumn("RES_PID")
|
||||
.references("HFJ_RESOURCE", "RES_ID");
|
||||
|
||||
version
|
||||
.onTable("HFJ_RES_VER_PROV")
|
||||
.dropIndex("20230523.1", "IDX_RESVERPROV_RESVER_PID");
|
||||
|
||||
}
|
||||
|
||||
protected void init660() {
|
||||
|
|
|
@ -41,8 +41,7 @@ import static ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable.SOURCE_URI_LENGT
|
|||
@Table(name = "HFJ_RES_VER_PROV", indexes = {
|
||||
@Index(name = "IDX_RESVERPROV_SOURCEURI", columnList = "SOURCE_URI"),
|
||||
@Index(name = "IDX_RESVERPROV_REQUESTID", columnList = "REQUEST_ID"),
|
||||
@Index(name = "IDX_RESVERPROV_RES_PID", columnList = "RES_PID"),
|
||||
@Index(name = "IDX_RESVERPROV_RESVER_PID", columnList = "RES_VER_PID")
|
||||
@Index(name = "IDX_RESVERPROV_RES_PID", columnList = "RES_PID")
|
||||
})
|
||||
@Entity
|
||||
public class ResourceHistoryProvenanceEntity extends BasePartitionable {
|
||||
|
|
Loading…
Reference in New Issue