Skip to content

Commit e1e81c0

Browse files
committed
Update trigger creation code for new db
1 parent 24951aa commit e1e81c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/galaxy/model/triggers/update_audit_table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def statement_trigger_fn(id_field):
5656
AS $BODY$
5757
BEGIN
5858
INSERT INTO history_audit (history_id, update_time)
59-
SELECT DISTINCT {id_field}, CURRENT_TIMESTAMP AT TIME ZONE 'UTC'
59+
SELECT DISTINCT {id_field}, clock_timestamp() AT TIME ZONE 'UTC'
6060
FROM new_table
6161
WHERE {id_field} IS NOT NULL
6262
ON CONFLICT DO NOTHING;
@@ -75,7 +75,7 @@ def row_trigger_fn(id_field):
7575
AS $BODY$
7676
BEGIN
7777
INSERT INTO history_audit (history_id, update_time)
78-
VALUES (NEW.{id_field}, CURRENT_TIMESTAMP AT TIME ZONE 'UTC')
78+
VALUES (NEW.{id_field}, clock_timestamp() AT TIME ZONE 'UTC')
7979
ON CONFLICT DO NOTHING;
8080
RETURN NULL;
8181
END;

0 commit comments

Comments
 (0)