From ca60fcadf89d0814e47cb40e9cda588e6b35b9e2 Mon Sep 17 00:00:00 2001 From: Lisa Best Date: Fri, 18 Oct 2024 11:59:37 +1030 Subject: [PATCH] Amend the backfill script as further testing detected it was not handling hours correctly or interpreting the Z timezone as UTC. --- .../V13.2__workflow_index_backfill_update_time.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-persistence/src/main/resources/db/migration_postgres_data/V13.2__workflow_index_backfill_update_time.sql b/postgres-persistence/src/main/resources/db/migration_postgres_data/V13.2__workflow_index_backfill_update_time.sql index f63e6d6a7..2ffbec396 100644 --- a/postgres-persistence/src/main/resources/db/migration_postgres_data/V13.2__workflow_index_backfill_update_time.sql +++ b/postgres-persistence/src/main/resources/db/migration_postgres_data/V13.2__workflow_index_backfill_update_time.sql @@ -1,4 +1,4 @@ -- Optional back-fill script to populate updateTime historically. UPDATE workflow_index -SET update_time = to_timestamp(json_data->>'updateTime', 'YYYY-MM-DDTHH24:MI:SS.MSZ')::timestamp WITH time zone +SET update_time = to_timestamp(json_data->>'updateTime', 'YYYY-MM-DD"T"HH24:MI:SS.MS')::timestamp AT TIME ZONE '00:00' WHERE json_data->>'updateTime' IS NOT NULL; \ No newline at end of file