diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java index daa0f9f0d34..fc723706f11 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java @@ -69,12 +69,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { version.onTable("HFJ_RES_VER").dropColumn("20200218.2", "FORCED_ID_PID"); version.onTable("HFJ_RES_VER").addForeignKey("20200218.3", "FK_RESOURCE_HISTORY_RESOURCE").toColumn("RES_ID").references("HFJ_RESOURCE", "RES_ID"); version.onTable("HFJ_RES_VER").modifyColumn("20200220.1", "RES_ID").nonNullable().failureAllowed().withType(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); - - // These should have been non-nullable a long time ago - version.onTable("HFJ_SPIDX_STRING").modifyColumn("20200413.1", "HASH_NORM_PREFIX").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); - version.onTable("HFJ_SPIDX_STRING").modifyColumn("20200413.2", "HASH_IDENTITY").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); - version.onTable("HFJ_SPIDX_STRING").modifyColumn("20200413.3", "HASH_EXACT").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); - + // Drop unused column version.onTable("HFJ_RESOURCE").dropIndex("20200419.1", "IDX_RES_PROFILE"); version.onTable("HFJ_RESOURCE").dropColumn("20200419.2", "RES_PROFILE"); diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java index 339809afb33..851965c43f0 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceIndexedSearchParamString.java @@ -95,17 +95,17 @@ public class ResourceIndexedSearchParamString extends BaseResourceIndexedSearchP /** * @since 3.4.0 - At some point this should be made not-null */ - @Column(name = "HASH_NORM_PREFIX", nullable = false) + @Column(name = "HASH_NORM_PREFIX", nullable = true) private Long myHashNormalizedPrefix; /** * @since 3.6.0 - At some point this should be made not-null */ - @Column(name = "HASH_IDENTITY", nullable = false) + @Column(name = "HASH_IDENTITY", nullable = true) private Long myHashIdentity; /** * @since 3.4.0 - At some point this should be made not-null */ - @Column(name = "HASH_EXACT", nullable = false) + @Column(name = "HASH_EXACT", nullable = true) private Long myHashExact; @Transient private transient ModelConfig myModelConfig;