3702 mpi link add index (#3708)
* 3702 - added index to mpi_link * added changelog file
This commit is contained in:
parent
3da39aeda3
commit
93b89b2bd7
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
type: add
|
||||
issue: 3702
|
||||
title: "Added index for table MPI_LINK on attributes MATCH_RESULT, TARGET_PID and VERSION"
|
|
@ -36,6 +36,7 @@ import javax.persistence.ForeignKey;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
|
@ -52,6 +53,8 @@ import java.util.Date;
|
|||
// v---- this one
|
||||
//TODO GGG revisit adding this: @UniqueConstraint(name = "IDX_EMPI_GR_TGT", columnNames = {"GOLDEN_RESOURCE_PID", "TARGET_PID"}),
|
||||
//TODO GGG Should i make individual indices for PERSON/TARGET?
|
||||
}, indexes = {
|
||||
@Index(name = "IDX_EMPI_MATCH_TGT_VER", columnList = "MATCH_RESULT, TARGET_PID, VERSION")
|
||||
})
|
||||
public class MdmLink extends BasePartitionable implements IMdmLink {
|
||||
public static final int VERSION_LENGTH = 16;
|
||||
|
|
|
@ -386,6 +386,13 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|||
|
||||
version.onTable("NPM_PACKAGE_VER_RES")
|
||||
.modifyColumn("20220501.2","FHIR_VERSION_ID").nonNullable().withType(ColumnTypeEnum.STRING, 20);
|
||||
|
||||
// Fix for https://gitlab.com/simpatico.ai/cdr/-/issues/3166
|
||||
version.onTable("MPI_LINK")
|
||||
.addIndex("20220613.1", "IDX_EMPI_MATCH_TGT_VER")
|
||||
.unique(false)
|
||||
.online(true)
|
||||
.withColumns("MATCH_RESULT", "TARGET_PID", "VERSION");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue