actor.usr_message

Soft Deletes: This table uses a deleted boolean flag rather than physical row deletion. Ad-hoc queries must include WHERE deleted = false to exclude logically-deleted rows. The application layer enforces this automatically; direct SQL does not.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: usr_message_sending_lib_fkey, usr_message_usr_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('actor.usr_message_id_seq'::regclass)

usr FK

integer

No

actor.usr(id)

title

text

Yes

message

text

No

create_date

timestamp with time zone

No

now()

deleted SOFT-DEL

boolean

No

false

read_date

timestamp with time zone

Yes

sending_lib FK

integer

No

actor.org_unit(id)

pub

boolean

No

false

stop_date

timestamp with time zone

Yes

editor FK

bigint

Yes

actor.usr(id)

edit_date

timestamp with time zone

Yes

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

editor

actor.usr(id)

NO ACTION

NO ACTION

No

usr_message_editor_fkey

sending_lib

actor.org_unit(id)

NO ACTION

NO ACTION

DEFERRED

usr_message_sending_lib_fkey

usr

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

usr_message_usr_fkey

Indexes

Index Method Definition

usr_message_pkey PK

btree

CREATE UNIQUE INDEX usr_message_pkey ON actor.usr_message USING btree (id)

aum_editor

btree

CREATE INDEX aum_editor ON actor.usr_message USING btree (editor)

aum_usr

btree

CREATE INDEX aum_usr ON actor.usr_message USING btree (usr)

Referenced By

The following tables have foreign keys pointing to actor.usr_message (1 referencing table(s)):

Table Referencing Column(s) Referenced Column(s) Constraint

actor.usr_standing_penalty

usr_message

id

usr_standing_penalty_usr_message_fkey