Schema asset

Table: call_number

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
creator : bigint -- NOT NULL, REFERENCES actor.usr.
create_date : timestamp with time zone -- DEFAULT now(),
editor : bigint -- NOT NULL, REFERENCES actor.usr.
edit_date : timestamp with time zone -- DEFAULT now(),
record : bigint -- NOT NULL, REFERENCES biblio.record_entry.
owning_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
label : text -- NOT NULL,
deleted : boolean -- NOT NULL, DEFAULT false,
label_class : bigint -- NOT NULL, DEFAULT 1, REFERENCES asset.call_number_class.
label_sortkey : text --

Indexes: 

asset_call_number_creator_idx : creator
asset_call_number_dewey_idx : call_number_dewey(label)
asset_call_number_editor_idx : editor
asset_call_number_label_sortkey : oils_text_as_bytea(label_sortkey)
asset_call_number_label_sortkey_browse : oils_text_as_bytea(label_sortkey), oils_text_as_bytea(label), id, owning_lib) WHERE ((deleted IS FALSE) OR (deleted = false)
asset_call_number_record_idx : record
asset_call_number_upper_label_id_owning_lib_idx : oils_text_as_bytea(label), id, owning_lib

Tables referencing asset.call_number_note via Foreign Key Constraints: 

asset.call_number_noteasset.copy
asset.uri_call_number_mapcontainer.call_number_bucket_item
serial.distributionserial.unit

Table: call_number_class

Defines the call number normalization database functions in the "normalizer" column and the tag/subfield combinations to use to lookup the call number in the "field" column for a given classification scheme. Tag/subfield combinations are delimited by commas.

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
name : text -- NOT NULL,
normalizer : text -- NOT NULL, DEFAULT 'asset.normalize_generic'::text,
field : text -- NOT NULL, DEFAULT '050ab,055ab,060ab,070ab,080ab,082ab,086ab,088ab,090,092,096,098,099'::text,

Tables referencing asset.call_number via Foreign Key Constraints: 

asset.call_number 

Table: call_number_note

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
call_number : bigint -- NOT NULL, REFERENCES asset.call_number.
creator : bigint -- NOT NULL, REFERENCES actor.usr.
create_date : timestamp with time zone -- DEFAULT now(),
pub : boolean -- NOT NULL, DEFAULT false,
title : text -- NOT NULL,
value : text -- NOT NULL,

Indexes: 

asset_call_number_note_creator_idx : creator

Table: copy

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
circ_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
creator : bigint -- NOT NULL, REFERENCES actor.usr.
call_number : bigint -- NOT NULL, REFERENCES asset.call_number.
editor : bigint -- NOT NULL, REFERENCES actor.usr.
create_date : timestamp with time zone -- DEFAULT now(),
edit_date : timestamp with time zone -- DEFAULT now(),
copy_number : integer --
status : integer -- NOT NULL, REFERENCES config.copy_status.
location : integer -- NOT NULL, DEFAULT 1, REFERENCES asset.copy_location.
loan_duration : integer -- NOT NULL,
fine_level : integer -- NOT NULL,
age_protect : integer --
circulate : boolean -- NOT NULL, DEFAULT true,
deposit : boolean -- NOT NULL, DEFAULT false,
ref : boolean -- NOT NULL, DEFAULT false,
holdable : boolean -- NOT NULL, DEFAULT true,
deposit_amount : numeric(6,2) -- NOT NULL, DEFAULT 0.00,
price : numeric(8,2) --
barcode : text -- NOT NULL,
circ_modifier : text -- REFERENCES config.circ_modifier.
circ_as_type : text --
dummy_title : text --
dummy_author : text --
alert_message : text --
opac_visible : boolean -- NOT NULL, DEFAULT true,
deleted : boolean -- NOT NULL, DEFAULT false,
floating : boolean -- NOT NULL, DEFAULT false,
dummy_isbn : text --
status_changed_time : timestamp with time zone --
mint_condition : boolean -- NOT NULL, DEFAULT true,
cost : numeric(8,2) --

Constraints: 

copy_fine_level_check : CHECK ((fine_level = ANY (ARRAY[1, 2, 3])))
copy_loan_duration_check : CHECK ((loan_duration = ANY (ARRAY[1, 2, 3])))

Indexes: 

cp_avail_cn_idx : call_number
cp_cn_idx : call_number
cp_create_date : create_date
cp_creator_idx : creator
cp_editor_idx : editor

Tables referencing asset.copy_note via Foreign Key Constraints: 

asset.copy_notecontainer.copy_bucket_item

Table: copy_location

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
name : text -- UNIQUE#1, NOT NULL,
owning_lib : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
holdable : boolean -- NOT NULL, DEFAULT true,
hold_verify : boolean -- NOT NULL, DEFAULT false,
opac_visible : boolean -- NOT NULL, DEFAULT true,
circulate : boolean -- NOT NULL, DEFAULT true,
label_prefix : text --
label_suffix : text --

Tables referencing acq.distribution_formula_entry via Foreign Key Constraints: 

acq.distribution_formula_entryacq.lineitem_detail
asset.copyasset.copy_location_order
asset.copy_template 

Table: copy_location_order

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
location : integer -- UNIQUE#1, NOT NULL, REFERENCES asset.copy_location.
org : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
position : integer -- NOT NULL,

Table: copy_note

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
owning_copy : bigint -- NOT NULL, REFERENCES asset.copy.
creator : bigint -- NOT NULL, REFERENCES actor.usr.
create_date : timestamp with time zone -- DEFAULT now(),
pub : boolean -- NOT NULL, DEFAULT false,
title : text -- NOT NULL,
value : text -- NOT NULL,

Indexes: 

asset_copy_note_creator_idx : creator
asset_copy_note_owning_copy_idx : owning_copy

Table: copy_template

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
owning_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
creator : bigint -- NOT NULL, REFERENCES actor.usr.
editor : bigint -- NOT NULL, REFERENCES actor.usr.
create_date : timestamp with time zone -- DEFAULT now(),
edit_date : timestamp with time zone -- DEFAULT now(),
name : text -- NOT NULL,
circ_lib : integer -- REFERENCES actor.org_unit.
status : integer -- REFERENCES config.copy_status.
location : integer -- REFERENCES asset.copy_location.
loan_duration : integer --
fine_level : integer --
age_protect : integer --
circulate : boolean --
deposit : boolean --
ref : boolean --
holdable : boolean --
deposit_amount : numeric(6,2) --
price : numeric(8,2) --
circ_modifier : text --
circ_as_type : text --
alert_message : text --
opac_visible : boolean --
floating : boolean --
mint_condition : boolean --

Constraints: 

valid_fine_level : CHECK (((fine_level IS NULL) OR (loan_duration = ANY (ARRAY[1, 2, 3]))))
valid_loan_duration : CHECK (((loan_duration IS NULL) OR (loan_duration = ANY (ARRAY[1, 2, 3]))))

Tables referencing serial.distribution via Foreign Key Constraints: 

serial.distribution 

Table: opac_visible_copies

Materialized view of copies that are visible in the OPAC, used by search.query_parser_fts() to speed up OPAC visibility checks on large databases. Contents are maintained by a set of triggers.

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint -- PRIMARY KEY,
record : bigint --
circ_lib : integer --

Indexes: 

opac_visible_copies_idx1 : record, circ_lib

Table: stat_cat

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
owner : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
opac_visible : boolean -- NOT NULL, DEFAULT false,
name : text -- UNIQUE#1, NOT NULL,
required : boolean -- NOT NULL, DEFAULT false,

Tables referencing asset.stat_cat_entry via Foreign Key Constraints: 

asset.stat_cat_entryasset.stat_cat_entry_copy_map

Table: stat_cat_entry

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
stat_cat : integer -- UNIQUE#1, NOT NULL, REFERENCES asset.stat_cat.
owner : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
value : text -- UNIQUE#1, NOT NULL,

Tables referencing asset.stat_cat_entry_copy_map via Foreign Key Constraints: 

asset.stat_cat_entry_copy_map 

Table: stat_cat_entry_copy_map

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
stat_cat : integer -- UNIQUE#1, NOT NULL, REFERENCES asset.stat_cat.
stat_cat_entry : integer -- NOT NULL, REFERENCES asset.stat_cat_entry.
owning_copy : bigint -- UNIQUE#1, NOT NULL,

Indexes: 

scecm_owning_copy_idx : owning_copy

Table: stat_cat_entry_transparency_map

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
stat_cat : integer -- UNIQUE#1, NOT NULL,
stat_cat_entry : integer -- NOT NULL,
owning_transparency : integer -- UNIQUE#1, NOT NULL,

Table: uri

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
href : text -- NOT NULL,
label : text --
use_restriction : text --
active : boolean -- NOT NULL, DEFAULT true,

Tables referencing asset.uri_call_number_map via Foreign Key Constraints: 

asset.uri_call_number_mapserial.item

Table: uri_call_number_map

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
uri : integer -- UNIQUE#1, NOT NULL, REFERENCES asset.uri.
call_number : integer -- UNIQUE#1, NOT NULL, REFERENCES asset.call_number.

Indexes: 

asset_uri_call_number_map_cn_idx : call_number

acp_status_changed()

Function Properties
Language: PLPGSQL
Return Type: trigger

autogenerate_placeholder_barcode()

Function Properties
Language: PLPGSQL
Return Type: trigger

cache_copy_visibility()

Trigger function to update the copy OPAC visiblity cache.

Function Properties
Language: PLPGSQL
Return Type: trigger

label_normalizer()

Function Properties
Language: PLPGSQL
Return Type: trigger

label_normalizer_dewey(text)

Function Properties
Language: PLPERLU
Return Type: text

label_normalizer_generic(text)

Function Properties
Language: PLPERLU
Return Type: text

label_normalizer_lc(text)

Function Properties
Language: PLPERLU
Return Type: text

merge_record_assets(source_record bigint, target_record bigint)

Function Properties
Language: PLPGSQL
Return Type: integer

metarecord_copy_count(transcendant integer, unshadow bigint, available boolean)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

opac_lasso_metarecord_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

opac_lasso_record_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

opac_ou_metarecord_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

opac_ou_record_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

record_copy_count(transcendant integer, unshadow bigint, available boolean)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

refresh_opac_visible_copies_mat_view()

Rebuild the copy OPAC visibility cache. Useful during migrations.

Function Properties
Language: SQL
Return Type: void

staff_lasso_metarecord_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

staff_lasso_record_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

staff_ou_metarecord_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record

staff_ou_record_copy_count(transcendant integer, unshadow bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF record