acq.lineitem_detail

Cascading Deletes: Deleting rows from this table will cascade to: acq.lineitem.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: lineitem_detail_cancel_reason_fkey, lineitem_detail_circ_modifier_fkey, lineitem_detail_fund_debit_fkey, lineitem_detail_fund_fkey, lineitem_detail_lineitem_fkey, lineitem_detail_location_fkey, lineitem_detail_owning_lib_fkey, lineitem_detail_receiver_fkey.

Trigger Side Effects: Writing to this table automatically triggers writes to other tables:

Columns

Column Type Nullable Default Notes

id PK

bigint

No

nextval('acq.lineitem_detail_id_seq'::regclass)

lineitem FK

integer

No

acq.lineitem(id)

fund FK

integer

Yes

acq.fund(id)

fund_debit FK

integer

Yes

acq.fund_debit(id)

eg_copy_id

bigint

Yes

barcode

text

Yes

cn_label

text

Yes

note

text

Yes

collection_code

text

Yes

circ_modifier FK

text

Yes

config.circ_modifier(code)

owning_lib FK

integer

Yes

actor.org_unit(id)

location FK

integer

Yes

asset.copy_location(id)

recv_time

timestamp with time zone

Yes

receiver FK

integer

Yes

actor.usr(id)

cancel_reason FK

integer

Yes

acq.cancel_reason(id)

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

cancel_reason

acq.cancel_reason(id)

NO ACTION

NO ACTION

DEFERRED

lineitem_detail_cancel_reason_fkey

circ_modifier

config.circ_modifier(code)

SET NULL

NO ACTION

DEFERRED

lineitem_detail_circ_modifier_fkey

fund_debit

acq.fund_debit(id)

NO ACTION

NO ACTION

DEFERRED

lineitem_detail_fund_debit_fkey

fund

acq.fund(id)

NO ACTION

NO ACTION

DEFERRED

lineitem_detail_fund_fkey

lineitem

acq.lineitem(id)

CASCADE

NO ACTION

DEFERRED

lineitem_detail_lineitem_fkey

location

asset.copy_location(id)

SET NULL

NO ACTION

DEFERRED

lineitem_detail_location_fkey

owning_lib

actor.org_unit(id)

SET NULL

NO ACTION

DEFERRED

lineitem_detail_owning_lib_fkey

receiver

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

lineitem_detail_receiver_fkey

Indexes

Index Method Definition

lineitem_detail_pkey PK

btree

CREATE UNIQUE INDEX lineitem_detail_pkey ON acq.lineitem_detail USING btree (id)

li_detail_li_idx

btree

CREATE INDEX li_detail_li_idx ON acq.lineitem_detail USING btree (lineitem)

lineitem_detail_fund_debit_idx

btree

CREATE INDEX lineitem_detail_fund_debit_idx ON acq.lineitem_detail USING btree (fund_debit)

Triggers

Trigger Timing Event Level Function

audit_acq_lineitem_detail_update_trigger

AFTER

DELETE OR UPDATE

ROW

acq.audit_acq_lineitem_detail_func()

Trigger Bodies

audit_acq_lineitem_detail_update_trigger

Function: acq.audit_acq_lineitem_detail_func()
Timing: AFTER DELETE OR UPDATE ROW

        BEGIN
            INSERT INTO acq.acq_lineitem_detail_history
                SELECT	nextval('acq.acq_lineitem_detail_pkey_seq'),
                    now(),
                    SUBSTR(TG_OP,1,1),
                    OLD.*;
            RETURN NULL;
        END;

Referenced By

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

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

acq.claim

lineitem_detail

id

claim_lineitem_detail_fkey