From 13ae273cbfd7bf399515844cd972dc74f814d36f Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Fri, 26 Jul 2024 12:16:30 -0400 Subject: [PATCH] SEARCH_UUID should be non-null (#6165) Avoid using constants in migrations because it creates false history. --- .../fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java index e085e7ec15b..e2d37341ee9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java @@ -473,7 +473,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { version.onTable(Search.HFJ_SEARCH) .modifyColumn("20240722.1", Search.SEARCH_UUID) - .nullable() + .nonNullable() .withType(ColumnTypeEnum.STRING, 48); { @@ -1026,7 +1026,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { version.onTable(Search.HFJ_SEARCH) .addColumn("20230215.1", Search.SEARCH_UUID) .nullable() - .type(ColumnTypeEnum.STRING, Search.SEARCH_UUID_COLUMN_LENGTH); + .type(ColumnTypeEnum.STRING, 48); version.onTable(BulkImportJobEntity.HFJ_BLK_IMPORT_JOB) .addColumn("20230215.2", BulkImportJobEntity.JOB_ID) .nullable() @@ -3146,7 +3146,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { version.onTable("HFJ_SEARCH") .modifyColumn("20190814.7", "SEARCH_UUID") .nonNullable() - .withType(ColumnTypeEnum.STRING, Search.SEARCH_UUID_COLUMN_LENGTH); + .withType(ColumnTypeEnum.STRING, 36); version.onTable("HFJ_SEARCH_PARM").dropThisTable("20190814.8");