Merge branch 'rel_6_4' of https://github.com/hapifhir/hapi-fhir into rel_6_4

This commit is contained in:
longma1 2023-03-07 12:42:49 -07:00
commit 6fa127073b
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
type: fix
issue: 4630
title: "Default values are provided for the new UPDATE_TIME columns so batch jobs started before an upgrade can complete."

View File

@ -175,6 +175,14 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks<VersionEnum> {
.nullable()
.type(ColumnTypeEnum.DATE_TIMESTAMP);
version.executeRawSql("20230397.1",
"update BT2_JOB_INSTANCE " +
"set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') " +
"where UPDATE_TIME is null;");
version.executeRawSql("20230397.2",
"update bt2_work_chunk " +
"set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') " +
"where UPDATE_TIME is null;");
}