biblio.record_note

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.

Cascading Deletes: Deleting rows from this table will cascade to: biblio.record_entry.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: biblio_record_note_creator_fkey, biblio_record_note_editor_fkey, biblio_record_note_record_fkey.

Columns

Column Type Nullable Default Notes

id PK

bigint

No

nextval('biblio.record_note_id_seq'::regclass)

record FK

bigint

No

biblio.record_entry(id)

value

text

No

creator FK

integer

No

1

actor.usr(id)

editor FK

integer

No

1

actor.usr(id)

deleted SOFT-DEL

boolean

No

false

create_date

timestamp with time zone

No

now()

edit_date

timestamp with time zone

No

now()

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

creator

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

biblio_record_note_creator_fkey

editor

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

biblio_record_note_editor_fkey

record

biblio.record_entry(id)

CASCADE

NO ACTION

DEFERRED

biblio_record_note_record_fkey

Indexes

Index Method Definition

record_note_pkey PK

btree

CREATE UNIQUE INDEX record_note_pkey ON biblio.record_note USING btree (id)

biblio_record_note_creator_idx

btree

CREATE INDEX biblio_record_note_creator_idx ON biblio.record_note USING btree (creator)

biblio_record_note_editor_idx

btree

CREATE INDEX biblio_record_note_editor_idx ON biblio.record_note USING btree (editor)

biblio_record_note_record_idx

btree

CREATE INDEX biblio_record_note_record_idx ON biblio.record_note USING btree (record)