1 -- Evergreen DB patch 0619.schema.au_last_update_time.sql
4 -- check whether patch can be applied
5 SELECT evergreen.upgrade_deps_block_check('0619', :eg_version);
7 -- Add new column last_update_time to actor.usr, with trigger to maintain it
8 -- Add corresponding new column to auditor.actor_usr_history
11 ADD COLUMN last_update_time TIMESTAMPTZ;
13 ALTER TABLE auditor.actor_usr_history
14 ADD COLUMN last_update_time TIMESTAMPTZ;
16 CREATE OR REPLACE FUNCTION actor.au_updated()
19 NEW.last_update_time := now();
24 CREATE TRIGGER au_update_trig
25 BEFORE INSERT OR UPDATE ON actor.usr
26 FOR EACH ROW EXECUTE PROCEDURE actor.au_updated();