From 826cb0ff10129bdce31fd51a2fdc6ac382265df3 Mon Sep 17 00:00:00 2001 From: Diederik Muylwyk Date: Mon, 30 Sep 2019 20:18:20 -0400 Subject: [PATCH] Fix migration task for TermConceptProperty; should be BLOB, not CLOB. Good job! --- .../jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 876ab67b838..990b8454a62 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 @@ -80,8 +80,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { bulkExportJob.addIndex("IDX_BLKEX_EXPTIME").unique(false).withColumns("EXP_TIME"); bulkExportJob.addIndex("IDX_BLKEX_JOB_ID").unique(true).withColumns("JOB_ID"); - - // HFJ_BLK_EXPORT_COLLECTION + // HFJ_BLK_EXPORT_COLLECTION version.addIdGenerator("SEQ_BLKEXCOL_PID"); Builder.BuilderAddTableByColumns bulkExportCollection = version.addTableByColumns("HFJ_BLK_EXPORT_COLLECTION", "PID"); bulkExportCollection.addColumn("PID").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); @@ -99,7 +98,7 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { bulkExportCollectionFile.addColumn("RES_ID").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100); bulkExportCollectionFile.addForeignKey("FK_BLKEXCOLFILE_COLLECT").toColumn("COLLECTION_PID").references("HFJ_BLK_EXPORT_COLLECTION", "PID"); - + // HFJ_RES_VER_PROV version.startSectionWithMessage("Processing bulkExportCollectionFile: HFJ_RES_VER_PROV"); Builder.BuilderAddTableByColumns resVerProv = version.addTableByColumns("HFJ_RES_VER_PROV", "RES_VER_PID"); resVerProv.addColumn("RES_VER_PID").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG); @@ -149,7 +148,6 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { .unique(true) .withColumns("VALUESET_PID", "VALUESET_ORDER"); - // Account for RESTYPE_LEN column increasing from 30 to 35 version.onTable("HFJ_RESOURCE").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 35); version.onTable("HFJ_HISTORY_TAG").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 35); @@ -165,8 +163,9 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { version.startSectionWithMessage("Processing table: TRM_VALUESET_C_DESIGNATION"); version.onTable("TRM_VALUESET_C_DESIGNATION").modifyColumn("VAL").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 2000); + // TermConceptProperty version.startSectionWithMessage("Processing table: TRM_CONCEPT_PROPERTY"); - version.onTable("TRM_CONCEPT_PROPERTY").addColumn("PROP_VAL_LOB").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.CLOB); + version.onTable("TRM_CONCEPT_PROPERTY").addColumn("PROP_VAL_LOB").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.BLOB); } protected void init400() {