Merge pull request #1407 from jamesagnew/dm-add-trm-codesystem-ver-cs-display-to-migration-tool

Resolve "Add TRM_CODESYSTEM_VER.CS_DISPLAY to migration tool."
This commit is contained in:
Ken Stevens 2019-08-01 14:50:09 -04:00 committed by GitHub
commit 52fc057457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -40,7 +40,7 @@ import static org.apache.commons.lang3.StringUtils.length;
public class TermCodeSystemVersion implements Serializable {
private static final long serialVersionUID = 1L;
static final int MAX_VERSION_LENGTH = 200;
public static final int MAX_VERSION_LENGTH = 200;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "myCodeSystem")
private Collection<TermConcept> myConcepts;

View File

@ -20,10 +20,7 @@ package ca.uhn.fhir.jpa.migrate.tasks;
* #L%
*/
import ca.uhn.fhir.jpa.entity.TermCodeSystem;
import ca.uhn.fhir.jpa.entity.TermConcept;
import ca.uhn.fhir.jpa.entity.TermValueSet;
import ca.uhn.fhir.jpa.entity.TermValueSetConceptDesignation;
import ca.uhn.fhir.jpa.entity.*;
import ca.uhn.fhir.jpa.migrate.DriverTypeEnum;
import ca.uhn.fhir.jpa.migrate.taskdef.AddColumnTask;
import ca.uhn.fhir.jpa.migrate.taskdef.ArbitrarySqlTask;
@ -164,6 +161,11 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
.addIndex("IDX_VALUESET_C_DSGNTN_VAL")
.unique(false)
.withColumns("VAL");
// TermCodeSystemVersion
version.startSectionWithMessage("Processing table: TRM_CODESYSTEM_VER");
Builder.BuilderWithTableName termCodeSystemVersionTable = version.onTable("TRM_CODESYSTEM_VER");
termCodeSystemVersionTable.addColumn("CS_DISPLAY").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, TermCodeSystemVersion.MAX_VERSION_LENGTH);
}