parent
f5cc015ff3
commit
3a1a0418a0
|
@ -220,6 +220,14 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
||||||
|
|
||||||
protected void init680() {
|
protected void init680() {
|
||||||
Builder version = forVersion(VersionEnum.V6_8_0);
|
Builder version = forVersion(VersionEnum.V6_8_0);
|
||||||
|
// HAPI-FHIR #4801 - Add New Index On HFJ_RESOURCE
|
||||||
|
Builder.BuilderWithTableName resourceTable = version.onTable("HFJ_RESOURCE");
|
||||||
|
|
||||||
|
resourceTable
|
||||||
|
.addIndex("20230502.1", "IDX_RES_RESID_UPDATED")
|
||||||
|
.unique(false)
|
||||||
|
.online(true)
|
||||||
|
.withColumns("RES_ID", "RES_UPDATED", "PARTITION_ID");
|
||||||
|
|
||||||
Builder.BuilderWithTableName tagDefTable = version.onTable("HFJ_TAG_DEF");
|
Builder.BuilderWithTableName tagDefTable = version.onTable("HFJ_TAG_DEF");
|
||||||
tagDefTable.dropIndex("20230505.1", "IDX_TAGDEF_TYPESYSCODEVERUS");
|
tagDefTable.dropIndex("20230505.1", "IDX_TAGDEF_TYPESYSCODEVERUS");
|
||||||
|
|
|
@ -230,11 +230,12 @@ public class PatientIdPartitionInterceptorTest extends BaseResourceProviderR4Tes
|
||||||
Patient patient = myPatientDao.read(patientVersionOne);
|
Patient patient = myPatientDao.read(patientVersionOne);
|
||||||
assertEquals("1", patient.getIdElement().getVersionIdPart());
|
assertEquals("1", patient.getIdElement().getVersionIdPart());
|
||||||
|
|
||||||
myCaptureQueriesListener.logSelectQueries();
|
myCaptureQueriesListener.logSelectQueriesForCurrentThread();
|
||||||
assertEquals(4, myCaptureQueriesListener.getSelectQueries().size());
|
|
||||||
assertThat(myCaptureQueriesListener.getSelectQueries().get(0).getSql(false, false), containsString("PARTITION_ID in (?)"));
|
|
||||||
assertThat(myCaptureQueriesListener.getSelectQueries().get(1).getSql(false, false), containsString("PARTITION_ID="));
|
|
||||||
|
|
||||||
|
List<SqlQuery> selectQueriesForCurrentThread = myCaptureQueriesListener.getSelectQueriesForCurrentThread();
|
||||||
|
assertEquals(4, selectQueriesForCurrentThread.size());
|
||||||
|
assertThat(selectQueriesForCurrentThread.get(0).getSql(false, false), containsString("PARTITION_ID in (?)"));
|
||||||
|
assertThat(selectQueriesForCurrentThread.get(1).getSql(false, false), containsString("PARTITION_ID="));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue