serial.item

Cascading Deletes: Deleting rows from this table will cascade to: serial.issuance, serial.stream.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: item_creator_fkey, item_editor_fkey, item_issuance_fkey, item_stream_fkey, item_unit_fkey, item_uri_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('serial.item_id_seq'::regclass)

creator FK

integer

No

actor.usr(id)

editor FK

integer

No

actor.usr(id)

create_date

timestamp with time zone

No

now()

edit_date

timestamp with time zone

No

now()

issuance FK

integer

No

serial.issuance(id)

stream FK

integer

No

serial.stream(id)

unit FK

integer

Yes

serial.unit(id)

uri FK

integer

Yes

asset.uri(id)

date_expected

timestamp with time zone

Yes

date_received

timestamp with time zone

Yes

status

text

Yes

'Expected'::text

shadowed

boolean

No

false

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

creator

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

item_creator_fkey

editor

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

item_editor_fkey

issuance

serial.issuance(id)

CASCADE

NO ACTION

DEFERRED

item_issuance_fkey

stream

serial.stream(id)

CASCADE

NO ACTION

DEFERRED

item_stream_fkey

unit

serial.unit(id)

SET NULL

NO ACTION

DEFERRED

item_unit_fkey

uri

asset.uri(id)

SET NULL

NO ACTION

DEFERRED

item_uri_fkey

Check Constraints

  • valid_status: CHECK status = ANY (ARRAY['Bindery'::text, 'Bound'::text, 'Claimed'::text, 'Discarded'::text, 'Expected'::text, 'Not Held'::text, 'Not Published'::text, 'Received'::text])

Indexes

Index Method Definition

item_pkey PK

btree

CREATE UNIQUE INDEX item_pkey ON serial.item USING btree (id)

serial_item_date_received_idx

btree

CREATE INDEX serial_item_date_received_idx ON serial.item USING btree (date_received)

serial_item_issuance_idx

btree

CREATE INDEX serial_item_issuance_idx ON serial.item USING btree (issuance)

serial_item_status_idx

btree

CREATE INDEX serial_item_status_idx ON serial.item USING btree (status)

serial_item_stream_idx

btree

CREATE INDEX serial_item_stream_idx ON serial.item USING btree (stream)

serial_item_unit_idx

btree

CREATE INDEX serial_item_unit_idx ON serial.item USING btree (unit)

serial_item_uri_idx

btree

CREATE INDEX serial_item_uri_idx ON serial.item USING btree (uri)

Referenced By

The following tables have foreign keys pointing to serial.item (2 referencing table(s)):

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

acq.serial_claim

item

id

serial_claim_item_fkey

serial.item_note

item

id

item_note_item_fkey