actor.usr_activity
|
Data-Modifying Triggers: This table has BEFORE ROW trigger(s) that modify row data before write. Values you INSERT or UPDATE may differ from what is actually stored. See the Triggers section below. |
Columns
| Column | Type | Nullable | Default | Notes |
|---|---|---|---|---|
id PK |
|
No |
nextval('actor.usr_activity_id_seq'::regclass) |
|
usr FK |
|
Yes |
||
etype FK |
|
No |
||
event_time |
|
No |
now() |
|
event_data |
|
Yes |
Foreign Keys
| Column(s) | References | On Delete | On Update | Deferrable | Constraint |
|---|---|---|---|---|---|
|
NO ACTION |
NO ACTION |
No |
|
|
|
SET NULL |
NO ACTION |
No |
|
Indexes
| Index | Method | Definition |
|---|---|---|
|
btree |
|
|
btree |
|
Triggers
| Trigger | Timing | Event | Level | Function |
|---|---|---|---|---|
|
BEFORE |
INSERT |
ROW |
Trigger Bodies
remove_transient_usr_activity
Function: actor.usr_activity_transient_trg()
Timing: BEFORE INSERT ROW
|
This trigger modifies the row before it is written (returns a modified |
BEGIN
DELETE FROM actor.usr_activity act USING config.usr_activity_type atype
WHERE atype.transient AND
NEW.etype = atype.id AND
act.etype = atype.id AND
act.usr = NEW.usr;
RETURN NEW;
END;