OneData Audit Triggers
Every data object in OneData must have audit triggers associated with their tables. For tables, OneData automatically adds these audit triggers when the object is imported into OneData. For views, the base table must already have audit triggers.
The script for audit triggers is as follows:
Trigger on the audit column LST_UPD_DT in the Work schema:
CREATE OR REPLACE TRIGGER TRIGGER_NAME BEFORE UPDATE OR INSERT
ON TABLE_NAME FOR EACH ROW BEGIN :new.LST_UPD_DT := SYSDATE ; END;
Trigger on the audit column S2P_TRN_DT in the Release schema:
CREATE OR REPLACE TRIGGER TRIGGER_NAME BEFORE UPDATE OR INSERT
ON TABLE_NAME FOR EACH ROW BEGIN :new.S2P_TRN_DT := SYSDATE ; END;