|
|
@ -93,6 +93,10 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
Builder.BuilderWithTableName termValueSetTable = version.onTable("TRM_VALUESET");
|
|
|
|
Builder.BuilderWithTableName termValueSetTable = version.onTable("TRM_VALUESET");
|
|
|
|
termValueSetTable.addColumn("TOTAL_CONCEPTS").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
termValueSetTable.addColumn("TOTAL_CONCEPTS").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
termValueSetTable.addColumn("TOTAL_CONCEPT_DESIGNATIONS").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
termValueSetTable.addColumn("TOTAL_CONCEPT_DESIGNATIONS").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
|
|
|
|
termValueSetTable
|
|
|
|
|
|
|
|
.dropIndex("IDX_VALUESET_EXP_STATUS");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.dropIdGenerator("SEQ_SEARCHPARM_ID");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void init400() {
|
|
|
|
protected void init400() {
|
|
|
@ -115,22 +119,54 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
.renameColumn("myConceptMapUrl", "CONCEPT_MAP_URL", false, true)
|
|
|
|
.renameColumn("myConceptMapUrl", "CONCEPT_MAP_URL", false, true)
|
|
|
|
.renameColumn("mySourceValueSet", "SOURCE_VS", false, true)
|
|
|
|
.renameColumn("mySourceValueSet", "SOURCE_VS", false, true)
|
|
|
|
.renameColumn("myTargetValueSet", "TARGET_VS", false, true);
|
|
|
|
.renameColumn("myTargetValueSet", "TARGET_VS", false, true);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GROUP")
|
|
|
|
|
|
|
|
.modifyColumn("CONCEPT_MAP_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GROUP")
|
|
|
|
|
|
|
|
.modifyColumn("SOURCE_VERSION").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GROUP")
|
|
|
|
|
|
|
|
.modifyColumn("SOURCE_VS").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GROUP")
|
|
|
|
|
|
|
|
.modifyColumn("TARGET_VERSION").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GROUP")
|
|
|
|
|
|
|
|
.modifyColumn("TARGET_VS").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
.renameColumn("myConceptMapUrl", "CONCEPT_MAP_URL", false, true)
|
|
|
|
.renameColumn("myConceptMapUrl", "CONCEPT_MAP_URL", false, true)
|
|
|
|
.renameColumn("mySystem", "SYSTEM_URL", false, true)
|
|
|
|
.renameColumn("mySystem", "SYSTEM_URL", false, true)
|
|
|
|
.renameColumn("mySystemVersion", "SYSTEM_VERSION", false, true)
|
|
|
|
.renameColumn("mySystemVersion", "SYSTEM_VERSION", false, true)
|
|
|
|
.renameColumn("myValueSet", "VALUESET_URL", false, true);
|
|
|
|
.renameColumn("myValueSet", "VALUESET_URL", false, true);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
|
|
|
|
.modifyColumn("CONCEPT_MAP_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
|
|
|
|
.modifyColumn("SOURCE_CODE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 500);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
|
|
|
|
.modifyColumn("SYSTEM_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
|
|
|
|
.modifyColumn("SYSTEM_VERSION").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELEMENT")
|
|
|
|
|
|
|
|
.modifyColumn("VALUESET_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
.renameColumn("myConceptMapUrl", "CONCEPT_MAP_URL", false, true)
|
|
|
|
.renameColumn("myConceptMapUrl", "CONCEPT_MAP_URL", false, true)
|
|
|
|
.renameColumn("mySystem", "SYSTEM_URL", false, true)
|
|
|
|
.renameColumn("mySystem", "SYSTEM_URL", false, true)
|
|
|
|
.renameColumn("mySystemVersion", "SYSTEM_VERSION", false, true)
|
|
|
|
.renameColumn("mySystemVersion", "SYSTEM_VERSION", false, true)
|
|
|
|
.renameColumn("myValueSet", "VALUESET_URL", false, true);
|
|
|
|
.renameColumn("myValueSet", "VALUESET_URL", false, true);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
|
|
|
|
.modifyColumn("CONCEPT_MAP_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
|
|
|
|
.modifyColumn("SYSTEM_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
|
|
|
|
.modifyColumn("SYSTEM_VERSION").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
|
|
|
|
.modifyColumn("TARGET_CODE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 500);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_MAP_GRP_ELM_TGT")
|
|
|
|
|
|
|
|
.modifyColumn("VALUESET_URL").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT")
|
|
|
|
version.onTable("TRM_CONCEPT")
|
|
|
|
.renameColumn("CODE", "CODEVAL", false, true);
|
|
|
|
.renameColumn("CODE", "CODEVAL", false, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TermValueSet
|
|
|
|
// TermValueSet
|
|
|
|
version.startSectionWithMessage("Processing table: TRM_VALUESET");
|
|
|
|
version.startSectionWithMessage("Processing table: TRM_VALUESET");
|
|
|
|
version.addIdGenerator("SEQ_VALUESET_PID");
|
|
|
|
version.addIdGenerator("SEQ_VALUESET_PID");
|
|
|
@ -150,6 +186,8 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_VALUESET")
|
|
|
|
version.onTable("TRM_VALUESET")
|
|
|
|
.renameColumn("NAME", "VSNAME", true, true);
|
|
|
|
.renameColumn("NAME", "VSNAME", true, true);
|
|
|
|
|
|
|
|
version.onTable("TRM_VALUESET")
|
|
|
|
|
|
|
|
.modifyColumn("RES_ID").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
|
|
|
|
|
|
|
|
Builder.BuilderWithTableName termValueSetTableChange = version.onTable("TRM_VALUESET");
|
|
|
|
Builder.BuilderWithTableName termValueSetTableChange = version.onTable("TRM_VALUESET");
|
|
|
|
termValueSetTableChange.addColumn("EXPANSION_STATUS").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, TermValueSet.MAX_EXPANSION_STATUS_LENGTH);
|
|
|
|
termValueSetTableChange.addColumn("EXPANSION_STATUS").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, TermValueSet.MAX_EXPANSION_STATUS_LENGTH);
|
|
|
@ -206,6 +244,47 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
version.startSectionWithMessage("Processing table: TRM_CODESYSTEM_VER");
|
|
|
|
version.startSectionWithMessage("Processing table: TRM_CODESYSTEM_VER");
|
|
|
|
Builder.BuilderWithTableName termCodeSystemVersionTable = version.onTable("TRM_CODESYSTEM_VER");
|
|
|
|
Builder.BuilderWithTableName termCodeSystemVersionTable = version.onTable("TRM_CODESYSTEM_VER");
|
|
|
|
termCodeSystemVersionTable.addColumn("CS_DISPLAY").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, TermCodeSystemVersion.MAX_VERSION_LENGTH);
|
|
|
|
termCodeSystemVersionTable.addColumn("CS_DISPLAY").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, TermCodeSystemVersion.MAX_VERSION_LENGTH);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ResourceReindexJobEntry
|
|
|
|
|
|
|
|
version.addIdGenerator("SEQ_RES_REINDEX_JOB");
|
|
|
|
|
|
|
|
Builder.BuilderAddTableByColumns reindex = version.addTableByColumns("HFJ_RES_REINDEX_JOB", "PID");
|
|
|
|
|
|
|
|
reindex.addColumn("PID").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
|
|
|
|
reindex.addColumn("RES_TYPE").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, Constants.MAX_RESOURCE_NAME_LENGTH);
|
|
|
|
|
|
|
|
reindex.addColumn("UPDATE_THRESHOLD_HIGH").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.DATE_TIMESTAMP);
|
|
|
|
|
|
|
|
reindex.addColumn("JOB_DELETED").nonNullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.BOOLEAN);
|
|
|
|
|
|
|
|
reindex.addColumn("UPDATE_THRESHOLD_LOW").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.DATE_TIMESTAMP);
|
|
|
|
|
|
|
|
reindex.addColumn("SUSPENDED_UNTIL").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.DATE_TIMESTAMP);
|
|
|
|
|
|
|
|
reindex.addColumn("REINDEX_COUNT").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.INT);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Search
|
|
|
|
|
|
|
|
version.onTable("HFJ_SEARCH")
|
|
|
|
|
|
|
|
.addColumn("SEARCH_DELETED").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.BOOLEAN);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SEARCH")
|
|
|
|
|
|
|
|
.modifyColumn("SEARCH_LAST_RETURNED").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.DATE_TIMESTAMP);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SEARCH")
|
|
|
|
|
|
|
|
.addColumn("SEARCH_PARAM_MAP").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.BLOB);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SEARCH")
|
|
|
|
|
|
|
|
.modifyColumn("SEARCH_UUID").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, Search.UUID_COLUMN_LENGTH);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("HFJ_SEARCH_PARM").dropThisTable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_COORDS").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_DATE").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_STRING").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_STRING").addColumn("HASH_IDENTITY").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_STRING").addIndex("IDX_SP_STRING_HASH_IDENT").unique(false).withColumns("HASH_IDENTITY");
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_COORDS").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_QUANTITY").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_QUANTITY").dropColumn("HASH_UNITS_AND_VALPREFIX");
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_QUANTITY").dropColumn("HASH_VALPREFIX");
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_NUMBER").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_TOKEN").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_URI").modifyColumn("RES_TYPE").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 100);
|
|
|
|
|
|
|
|
version.onTable("HFJ_SPIDX_URI").modifyColumn("SP_URI").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 254);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CODESYSTEM").modifyColumn("CODE_SYSTEM_URI").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CODESYSTEM").modifyColumn("CS_NAME").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
version.onTable("TRM_CODESYSTEM_VER").modifyColumn("CS_VERSION_ID").nullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -236,6 +315,14 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
.addSql(DriverTypeEnum.MYSQL_5_7, " create table HFJ_RES_REINDEX_JOB (PID bigint not null, JOB_DELETED bit not null, RES_TYPE varchar(255), SUSPENDED_UNTIL datetime(6), UPDATE_THRESHOLD_HIGH datetime(6) not null, UPDATE_THRESHOLD_LOW datetime(6), primary key (PID))")
|
|
|
|
.addSql(DriverTypeEnum.MYSQL_5_7, " create table HFJ_RES_REINDEX_JOB (PID bigint not null, JOB_DELETED bit not null, RES_TYPE varchar(255), SUSPENDED_UNTIL datetime(6), UPDATE_THRESHOLD_HIGH datetime(6) not null, UPDATE_THRESHOLD_LOW datetime(6), primary key (PID))")
|
|
|
|
.addSql(DriverTypeEnum.ORACLE_12C, "create table HFJ_RES_REINDEX_JOB (PID number(19,0) not null, JOB_DELETED number(1,0) not null, RES_TYPE varchar2(255 char), SUSPENDED_UNTIL timestamp, UPDATE_THRESHOLD_HIGH timestamp not null, UPDATE_THRESHOLD_LOW timestamp, primary key (PID))");
|
|
|
|
.addSql(DriverTypeEnum.ORACLE_12C, "create table HFJ_RES_REINDEX_JOB (PID number(19,0) not null, JOB_DELETED number(1,0) not null, RES_TYPE varchar2(255 char), SUSPENDED_UNTIL timestamp, UPDATE_THRESHOLD_HIGH timestamp not null, UPDATE_THRESHOLD_LOW timestamp, primary key (PID))");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_DESIG").addColumn("CS_VER_PID").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_DESIG").addForeignKey("FK_CONCEPTDESIG_CSV").toColumn("CS_VER_PID").references("TRM_CODESYSTEM_VER", "PID");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_PROPERTY").addColumn("CS_VER_PID").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.LONG);
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT_PROPERTY").addForeignKey("FK_CONCEPTPROP_CSV").toColumn("CS_VER_PID").references("TRM_CODESYSTEM_VER", "PID");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("TRM_CONCEPT").addColumn("PARENT_PIDS").nullable().type(BaseTableColumnTypeTask.ColumnTypeEnum.CLOB);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void init350() {
|
|
|
|
private void init350() {
|
|
|
@ -290,6 +377,8 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
.addIndex("IDX_SP_DATE_HASH")
|
|
|
|
.addIndex("IDX_SP_DATE_HASH")
|
|
|
|
.unique(false)
|
|
|
|
.unique(false)
|
|
|
|
.withColumns("HASH_IDENTITY", "SP_VALUE_LOW", "SP_VALUE_HIGH");
|
|
|
|
.withColumns("HASH_IDENTITY", "SP_VALUE_LOW", "SP_VALUE_HIGH");
|
|
|
|
|
|
|
|
spidxDate
|
|
|
|
|
|
|
|
.dropIndex("IDX_SP_DATE");
|
|
|
|
spidxDate
|
|
|
|
spidxDate
|
|
|
|
.addTask(new CalculateHashesTask()
|
|
|
|
.addTask(new CalculateHashesTask()
|
|
|
|
.setColumnName("HASH_IDENTITY")
|
|
|
|
.setColumnName("HASH_IDENTITY")
|
|
|
@ -522,6 +611,9 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
version.startSectionWithMessage("Starting work on table: TRM_CONCEPT_DESIG");
|
|
|
|
version.startSectionWithMessage("Starting work on table: TRM_CONCEPT_DESIG");
|
|
|
|
version
|
|
|
|
version
|
|
|
|
.addTableRawSql("TRM_CONCEPT_DESIG")
|
|
|
|
.addTableRawSql("TRM_CONCEPT_DESIG")
|
|
|
|
|
|
|
|
.addSql(DriverTypeEnum.H2_EMBEDDED, "create table TRM_CONCEPT_DESIG (PID bigint not null, LANG varchar(500), USE_CODE varchar(500), USE_DISPLAY varchar(500), USE_SYSTEM varchar(500), VAL varchar(500) not null, CS_VER_PID bigint, CONCEPT_PID bigint, primary key (PID))")
|
|
|
|
|
|
|
|
.addSql(DriverTypeEnum.H2_EMBEDDED, "alter table TRM_CONCEPT_DESIG add constraint FK_CONCEPTDESIG_CSV foreign key (CS_VER_PID) references TRM_CODESYSTEM_VER")
|
|
|
|
|
|
|
|
.addSql(DriverTypeEnum.H2_EMBEDDED, "alter table TRM_CONCEPT_DESIG add constraint FK_CONCEPTDESIG_CONCEPT foreign key (CONCEPT_PID) references TRM_CONCEPT")
|
|
|
|
.addSql(DriverTypeEnum.DERBY_EMBEDDED, "create table TRM_CONCEPT_DESIG (PID bigint not null, LANG varchar(500), USE_CODE varchar(500), USE_DISPLAY varchar(500), USE_SYSTEM varchar(500), VAL varchar(500) not null, CS_VER_PID bigint, CONCEPT_PID bigint, primary key (PID))")
|
|
|
|
.addSql(DriverTypeEnum.DERBY_EMBEDDED, "create table TRM_CONCEPT_DESIG (PID bigint not null, LANG varchar(500), USE_CODE varchar(500), USE_DISPLAY varchar(500), USE_SYSTEM varchar(500), VAL varchar(500) not null, CS_VER_PID bigint, CONCEPT_PID bigint, primary key (PID))")
|
|
|
|
.addSql(DriverTypeEnum.DERBY_EMBEDDED, "alter table TRM_CONCEPT_DESIG add constraint FK_CONCEPTDESIG_CSV foreign key (CS_VER_PID) references TRM_CODESYSTEM_VER")
|
|
|
|
.addSql(DriverTypeEnum.DERBY_EMBEDDED, "alter table TRM_CONCEPT_DESIG add constraint FK_CONCEPTDESIG_CSV foreign key (CS_VER_PID) references TRM_CODESYSTEM_VER")
|
|
|
|
.addSql(DriverTypeEnum.DERBY_EMBEDDED, "alter table TRM_CONCEPT_DESIG add constraint FK_CONCEPTDESIG_CONCEPT foreign key (CONCEPT_PID) references TRM_CONCEPT")
|
|
|
|
.addSql(DriverTypeEnum.DERBY_EMBEDDED, "alter table TRM_CONCEPT_DESIG add constraint FK_CONCEPTDESIG_CONCEPT foreign key (CONCEPT_PID) references TRM_CONCEPT")
|
|
|
@ -649,6 +741,10 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
|
|
|
|
.addSql(DriverTypeEnum.MSSQL_2012, "create table TRM_CONCEPT_MAP_GRP_ELM_TGT (PID bigint not null, TARGET_CODE varchar(500) not null, myConceptMapUrl varchar(255), TARGET_DISPLAY varchar(400), TARGET_EQUIVALENCE varchar(50), mySystem varchar(255), mySystemVersion varchar(255), myValueSet varchar(255), CONCEPT_MAP_GRP_ELM_PID bigint not null, primary key (PID))")
|
|
|
|
.addSql(DriverTypeEnum.MSSQL_2012, "create table TRM_CONCEPT_MAP_GRP_ELM_TGT (PID bigint not null, TARGET_CODE varchar(500) not null, myConceptMapUrl varchar(255), TARGET_DISPLAY varchar(400), TARGET_EQUIVALENCE varchar(50), mySystem varchar(255), mySystemVersion varchar(255), myValueSet varchar(255), CONCEPT_MAP_GRP_ELM_PID bigint not null, primary key (PID))")
|
|
|
|
.addSql(DriverTypeEnum.MSSQL_2012, "create index IDX_CNCPT_MP_GRP_ELM_TGT_CD on TRM_CONCEPT_MAP_GRP_ELM_TGT (TARGET_CODE)")
|
|
|
|
.addSql(DriverTypeEnum.MSSQL_2012, "create index IDX_CNCPT_MP_GRP_ELM_TGT_CD on TRM_CONCEPT_MAP_GRP_ELM_TGT (TARGET_CODE)")
|
|
|
|
.addSql(DriverTypeEnum.MSSQL_2012, "alter table TRM_CONCEPT_MAP_GRP_ELM_TGT add constraint FK_TCMGETARGET_ELEMENT foreign key (CONCEPT_MAP_GRP_ELM_PID) references TRM_CONCEPT_MAP_GRP_ELEMENT");
|
|
|
|
.addSql(DriverTypeEnum.MSSQL_2012, "alter table TRM_CONCEPT_MAP_GRP_ELM_TGT add constraint FK_TCMGETARGET_ELEMENT foreign key (CONCEPT_MAP_GRP_ELM_PID) references TRM_CONCEPT_MAP_GRP_ELEMENT");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version.onTable("HFJ_IDX_CMP_STRING_UNIQ").modifyColumn("IDX_STRING").nonNullable().withType(BaseTableColumnTypeTask.ColumnTypeEnum.STRING, 200);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Boolean columnToBoolean(Object theValue) {
|
|
|
|
private Boolean columnToBoolean(Object theValue) {
|
|
|
|