Open KevinDougan opened 1 year ago
The recent fix that was added into 6.4.3 for #4630 does not work on an Oracle Database.
It produces the following ERROR:
2023-03-09 12:20:35.680 [cdr-scheduler-clustermgr-local-2] ERROR M: R: c.uhn.fhir.jpa.migrate.HapiMigrator - Migration failed ca.uhn.fhir.jpa.migrate.HapiMigrationException: HAPI-0047: Failure executing task "Execute raw sql", aborting! Cause: ca.uhn.fhir.jpa.migrate.HapiMigrationException: HAPI-0061: Failed during task 6.2.0.20230397.1: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [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;]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
I believe this is due to the trailing semi-colons on those added SQL statements, as shown here:
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;");
https://github.com/hapifhir/hapi-fhir/pull/4630/files
The recent fix that was added into 6.4.3 for #4630 does not work on an Oracle Database.
It produces the following ERROR:
I believe this is due to the trailing semi-colons on those added SQL statements, as shown here: