Merge remote-tracking branch 'origin/master' into do-20240206-core-bump-6-2-16

This commit is contained in:
dotasek.dev 2024-02-29 16:39:40 -05:00
commit bb914d2dae
2 changed files with 13 additions and 4 deletions

View File

@ -220,6 +220,14 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
protected void init680() {
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");
tagDefTable.dropIndex("20230505.1", "IDX_TAGDEF_TYPESYSCODEVERUS");

View File

@ -230,11 +230,12 @@ public class PatientIdPartitionInterceptorTest extends BaseResourceProviderR4Tes
Patient patient = myPatientDao.read(patientVersionOne);
assertEquals("1", patient.getIdElement().getVersionIdPart());
myCaptureQueriesListener.logSelectQueries();
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="));
myCaptureQueriesListener.logSelectQueriesForCurrentThread();
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="));
}