Schema action

Table: aged_circulation

Columns: 

field name : datatype -- parameters, contraints and notes
usr_post_code : text --
usr_home_ou : integer -- NOT NULL,
usr_profile : integer -- NOT NULL,
usr_birth_year : integer --
copy_call_number : integer -- NOT NULL,
copy_owning_lib : integer -- NOT NULL,
copy_circ_lib : integer -- NOT NULL,
copy_bib_record : bigint -- NOT NULL,
id : bigint -- PRIMARY KEY,
xact_start : timestamp with time zone -- NOT NULL,
xact_finish : timestamp with time zone --
unrecovered : boolean --
target_copy : bigint -- NOT NULL,
circ_lib : integer -- NOT NULL,
circ_staff : integer -- NOT NULL,
checkin_staff : integer --
checkin_lib : integer --
renewal_remaining : integer -- NOT NULL,
grace_period : interval -- NOT NULL,
due_date : timestamp with time zone --
stop_fines_time : timestamp with time zone --
checkin_time : timestamp with time zone --
create_time : timestamp with time zone -- NOT NULL,
duration : interval --
fine_interval : interval -- NOT NULL,
recurring_fine : numeric(6,2) --
max_fine : numeric(6,2) --
phone_renewal : boolean -- NOT NULL,
desk_renewal : boolean -- NOT NULL,
opac_renewal : boolean -- NOT NULL,
duration_rule : text -- NOT NULL,
recurring_fine_rule : text -- NOT NULL,
max_fine_rule : text -- NOT NULL,
stop_fines : text --
workstation : integer --
checkin_workstation : integer --
copy_location : integer -- NOT NULL,
checkin_scan_time : timestamp with time zone --
parent_circ : bigint --

Indexes: 

action_aged_circulation_target_copy_idx : target_copy
aged_circ_circ_lib_idx : circ_lib
aged_circ_copy_circ_lib_idx : copy_circ_lib
aged_circ_copy_location_idx : copy_location
aged_circ_copy_owning_lib_idx : copy_owning_lib
aged_circ_start_idx : xact_start

View: all_circulation

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint --
usr_post_code : text --
usr_home_ou : integer --
usr_profile : integer --
usr_birth_year : integer --
copy_call_number : bigint --
copy_location : integer --
copy_owning_lib : integer --
copy_circ_lib : integer --
copy_bib_record : bigint --
xact_start : timestamp with time zone --
xact_finish : timestamp with time zone --
target_copy : bigint --
circ_lib : integer --
circ_staff : integer --
checkin_staff : integer --
checkin_lib : integer --
renewal_remaining : integer --
grace_period : interval --
due_date : timestamp with time zone --
stop_fines_time : timestamp with time zone --
checkin_time : timestamp with time zone --
create_time : timestamp with time zone --
duration : interval --
fine_interval : interval --
recurring_fine : numeric(6,2) --
max_fine : numeric(6,2) --
phone_renewal : boolean --
desk_renewal : boolean --
opac_renewal : boolean --
duration_rule : text --
recurring_fine_rule : text --
max_fine_rule : text --
stop_fines : text --
workstation : integer --
checkin_workstation : integer --
checkin_scan_time : timestamp with time zone --
parent_circ : bigint --

Table: archive_actor_stat_cat

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
xact : bigint -- NOT NULL,
stat_cat : integer -- NOT NULL,
value : text -- NOT NULL,

Table: archive_asset_stat_cat

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
xact : bigint -- NOT NULL,
stat_cat : integer -- NOT NULL,
value : text -- NOT NULL,

View: billable_circulations

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint --
usr : integer --
xact_start : timestamp with time zone --
xact_finish : timestamp with time zone --
unrecovered : boolean --
target_copy : bigint --
circ_lib : integer --
circ_staff : integer --
checkin_staff : integer --
checkin_lib : integer --
renewal_remaining : integer --
grace_period : interval --
due_date : timestamp with time zone --
stop_fines_time : timestamp with time zone --
checkin_time : timestamp with time zone --
create_time : timestamp with time zone --
duration : interval --
fine_interval : interval --
recurring_fine : numeric(6,2) --
max_fine : numeric(6,2) --
phone_renewal : boolean --
desk_renewal : boolean --
opac_renewal : boolean --
duration_rule : text --
recurring_fine_rule : text --
max_fine_rule : text --
stop_fines : text --
workstation : integer --
checkin_workstation : integer --
copy_location : integer --
checkin_scan_time : timestamp with time zone --
parent_circ : bigint --

Table: circulation

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint -- PRIMARY KEY, DEFAULT nextval('money.billable_xact_id_seq'::regclass),
usr : integer -- NOT NULL, REFERENCES actor.usr.
xact_start : timestamp with time zone -- NOT NULL, DEFAULT now(),
xact_finish : timestamp with time zone --
unrecovered : boolean --
target_copy : bigint -- NOT NULL,
circ_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
circ_staff : integer -- NOT NULL,
checkin_staff : integer --
checkin_lib : integer --
renewal_remaining : integer -- NOT NULL,
grace_period : interval -- NOT NULL,
due_date : timestamp with time zone --
stop_fines_time : timestamp with time zone --
checkin_time : timestamp with time zone --
create_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
duration : interval --
fine_interval : interval -- NOT NULL, DEFAULT '1 day'::interval,
recurring_fine : numeric(6,2) --
max_fine : numeric(6,2) --
phone_renewal : boolean -- NOT NULL, DEFAULT false,
desk_renewal : boolean -- NOT NULL, DEFAULT false,
opac_renewal : boolean -- NOT NULL, DEFAULT false,
duration_rule : text -- NOT NULL,
recurring_fine_rule : text -- NOT NULL,
max_fine_rule : text -- NOT NULL,
stop_fines : text --
workstation : integer -- REFERENCES actor.workstation.
checkin_workstation : integer -- REFERENCES actor.workstation.
copy_location : integer -- NOT NULL, DEFAULT 1, REFERENCES asset.copy_location.
checkin_scan_time : timestamp with time zone --
parent_circ : bigint -- REFERENCES action.circulation.

Constraints: 

circulation_stop_fines_check : CHECK ((stop_fines = ANY (ARRAY['CHECKIN'::text, 'CLAIMSRETURNED'::text, 'LOST'::text, 'MAXFINES'::text, 'RENEW'::text, 'LONGOVERDUE'::text, 'CLAIMSNEVERCHECKEDOUT'::text])))

Indexes: 

action_circulation_target_copy_idx : target_copy
circ_all_usr_idx : usr
circ_checkin_staff_idx : checkin_staff
circ_checkin_time : checkin_time) WHERE (checkin_time IS NOT NULL
circ_circ_lib_idx : circ_lib
circ_circ_staff_idx : circ_staff
circ_open_date_idx : xact_start) WHERE (xact_finish IS NULL
circ_open_xacts_idx : usr) WHERE (xact_finish IS NULL
circ_outstanding_idx : usr) WHERE (checkin_time IS NULL

Tables referencing action.circulation via Foreign Key Constraints: 

action.circulation 

Table: fieldset

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
owner : integer -- NOT NULL, REFERENCES actor.usr.
owning_lib : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
status : text -- NOT NULL,
creation_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
scheduled_time : timestamp with time zone --
applied_time : timestamp with time zone --
classname : text -- NOT NULL,
name : text -- UNIQUE#1, NOT NULL,
stored_query : integer -- REFERENCES query.stored_query.
pkey_value : text --

Constraints: 

fieldset_one_or_the_other : CHECK ((((stored_query IS NOT NULL) AND (pkey_value IS NULL)) OR ((pkey_value IS NOT NULL) AND (stored_query IS NULL))))
valid_status : CHECK ((status = ANY (ARRAY['PENDING'::text, 'APPLIED'::text, 'ERROR'::text])))

Indexes: 

action_fieldset_sched_time_idx : scheduled_time
action_owner_idx : owner

Tables referencing action.fieldset_col_val via Foreign Key Constraints: 

action.fieldset_col_val 

Table: fieldset_col_val

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
fieldset : integer -- UNIQUE#1, NOT NULL, REFERENCES action.fieldset.
col : text -- UNIQUE#1, NOT NULL,
val : text --

Table: hold_copy_map

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
hold : integer -- UNIQUE#1, NOT NULL, REFERENCES action.hold_request.
target_copy : bigint -- UNIQUE#1, NOT NULL,

Indexes: 

acm_copy_idx : target_copy

Table: hold_notification

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
hold : integer -- NOT NULL, REFERENCES action.hold_request.
notify_staff : integer -- REFERENCES actor.usr.
notify_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
method : text -- NOT NULL,
note : text --

Indexes: 

ahn_hold_idx : hold
ahn_notify_staff_idx : notify_staff

Table: hold_request

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
request_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
capture_time : timestamp with time zone --
fulfillment_time : timestamp with time zone --
checkin_time : timestamp with time zone --
return_time : timestamp with time zone --
prev_check_time : timestamp with time zone --
expire_time : timestamp with time zone --
cancel_time : timestamp with time zone --
cancel_cause : integer -- REFERENCES action.hold_request_cancel_cause.
cancel_note : text --
target : bigint -- NOT NULL,
current_copy : bigint --
fulfillment_staff : integer -- REFERENCES actor.usr.
fulfillment_lib : integer -- REFERENCES actor.org_unit.
request_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
requestor : integer -- NOT NULL, REFERENCES actor.usr.
usr : integer -- NOT NULL, REFERENCES actor.usr.
selection_ou : integer -- NOT NULL,
selection_depth : integer -- NOT NULL,
pickup_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
hold_type : text -- NOT NULL,
holdable_formats : text --
phone_notify : text --
email_notify : boolean -- NOT NULL, DEFAULT true,
sms_notify : text --
sms_carrier : integer -- REFERENCES config.sms_carrier.
frozen : boolean -- NOT NULL, DEFAULT false,
thaw_date : timestamp with time zone --
shelf_time : timestamp with time zone --
cut_in_line : boolean --
mint_condition : boolean -- NOT NULL, DEFAULT true,
shelf_expire_time : timestamp with time zone --
current_shelf_lib : integer -- REFERENCES actor.org_unit.

Constraints: 

sms_check : CHECK (((sms_notify IS NULL) OR (sms_carrier IS NOT NULL)))

Indexes: 

hold_request_current_copy_idx : current_copy
hold_request_fulfillment_staff_idx : fulfillment_staff
hold_request_pickup_lib_idx : pickup_lib
hold_request_prev_check_time_idx : prev_check_time
hold_request_requestor_idx : requestor
hold_request_target_idx : target
hold_request_usr_idx : usr

Tables referencing action.hold_copy_map via Foreign Key Constraints: 

action.hold_copy_mapaction.hold_notification
action.hold_request_noteaction.hold_transit_copy

Table: hold_request_cancel_cause

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
label : text -- UNIQUE,

Tables referencing action.hold_request via Foreign Key Constraints: 

action.hold_request 

Table: hold_request_note

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
hold : bigint -- NOT NULL, REFERENCES action.hold_request.
title : text -- NOT NULL,
body : text -- NOT NULL,
slip : boolean -- NOT NULL, DEFAULT false,
pub : boolean -- NOT NULL, DEFAULT false,
staff : boolean -- NOT NULL, DEFAULT false,

Indexes: 

ahrn_hold_idx : hold

Table: hold_transit_copy

Columns: 

field name : datatype -- parameters, contraints and notes
id : integer -- PRIMARY KEY, DEFAULT nextval('action.transit_copy_id_seq'::regclass),
source_send_time : timestamp with time zone --
dest_recv_time : timestamp with time zone --
target_copy : bigint -- NOT NULL,
source : integer -- NOT NULL,
dest : integer -- NOT NULL,
prev_hop : integer --
copy_status : integer -- NOT NULL,
persistant_transfer : boolean -- NOT NULL, DEFAULT false,
prev_dest : integer --
hold : integer -- REFERENCES action.hold_request.

Indexes: 

active_hold_transit_cp_idx : target_copy
active_hold_transit_dest_idx : dest
active_hold_transit_source_idx : source

Table: in_house_use

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
item : bigint -- NOT NULL,
staff : integer -- NOT NULL, REFERENCES actor.usr.
org_unit : integer -- NOT NULL, REFERENCES actor.org_unit.
use_time : timestamp with time zone -- NOT NULL, DEFAULT now(),

Indexes: 

action_in_house_use_staff_idx : staff

Table: non_cat_in_house_use

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
item_type : bigint -- NOT NULL, REFERENCES config.non_cataloged_type.
staff : integer -- NOT NULL, REFERENCES actor.usr.
org_unit : integer -- NOT NULL, REFERENCES actor.org_unit.
use_time : timestamp with time zone -- NOT NULL, DEFAULT now(),

Indexes: 

non_cat_in_house_use_staff_idx : staff

Table: non_cataloged_circulation

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
patron : integer -- NOT NULL, REFERENCES actor.usr.
staff : integer -- NOT NULL, REFERENCES actor.usr.
circ_lib : integer -- NOT NULL, REFERENCES actor.org_unit.
item_type : integer -- NOT NULL, REFERENCES config.non_cataloged_type.
circ_time : timestamp with time zone -- NOT NULL, DEFAULT now(),

Indexes: 

action_non_cat_circ_patron_idx : patron
action_non_cat_circ_staff_idx : staff

View: open_circulation

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint --
usr : integer --
xact_start : timestamp with time zone --
xact_finish : timestamp with time zone --
unrecovered : boolean --
target_copy : bigint --
circ_lib : integer --
circ_staff : integer --
checkin_staff : integer --
checkin_lib : integer --
renewal_remaining : integer --
grace_period : interval --
due_date : timestamp with time zone --
stop_fines_time : timestamp with time zone --
checkin_time : timestamp with time zone --
create_time : timestamp with time zone --
duration : interval --
fine_interval : interval --
recurring_fine : numeric(6,2) --
max_fine : numeric(6,2) --
phone_renewal : boolean --
desk_renewal : boolean --
opac_renewal : boolean --
duration_rule : text --
recurring_fine_rule : text --
max_fine_rule : text --
stop_fines : text --
workstation : integer --
checkin_workstation : integer --
copy_location : integer --
checkin_scan_time : timestamp with time zone --
parent_circ : bigint --

Table: reservation_transit_copy

Columns: 

field name : datatype -- parameters, contraints and notes
id : integer -- PRIMARY KEY, DEFAULT nextval('action.transit_copy_id_seq'::regclass),
source_send_time : timestamp with time zone --
dest_recv_time : timestamp with time zone --
target_copy : bigint -- NOT NULL, REFERENCES booking.resource.
source : integer -- NOT NULL,
dest : integer -- NOT NULL,
prev_hop : integer --
copy_status : integer -- NOT NULL,
persistant_transfer : boolean -- NOT NULL, DEFAULT false,
prev_dest : integer --
reservation : integer -- REFERENCES booking.reservation.

Indexes: 

active_reservation_transit_cp_idx : target_copy
active_reservation_transit_dest_idx : dest
active_reservation_transit_source_idx : source

Table: survey

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
owner : integer -- NOT NULL, REFERENCES actor.org_unit.
start_date : timestamp with time zone -- NOT NULL, DEFAULT now(),
end_date : timestamp with time zone -- NOT NULL, DEFAULT (now() + '10 years'::interval),
usr_summary : boolean -- NOT NULL, DEFAULT false,
opac : boolean -- NOT NULL, DEFAULT false,
poll : boolean -- NOT NULL, DEFAULT false,
required : boolean -- NOT NULL, DEFAULT false,
name : text -- NOT NULL,
description : text -- NOT NULL,

Tables referencing action.survey_question via Foreign Key Constraints: 

action.survey_questionaction.survey_response

Table: survey_answer

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
question : integer -- NOT NULL, REFERENCES action.survey_question.
answer : text -- NOT NULL,

Tables referencing action.survey_response via Foreign Key Constraints: 

action.survey_response 

Table: survey_question

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
survey : integer -- NOT NULL, REFERENCES action.survey.
question : text -- NOT NULL,

Tables referencing action.survey_answer via Foreign Key Constraints: 

action.survey_answeraction.survey_response

Table: survey_response

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
response_group_id : integer --
usr : integer --
survey : integer -- NOT NULL, REFERENCES action.survey.
question : integer -- NOT NULL, REFERENCES action.survey_question.
answer : integer -- NOT NULL, REFERENCES action.survey_answer.
answer_date : timestamp with time zone --
effective_date : timestamp with time zone -- NOT NULL, DEFAULT now(),

Indexes: 

action_survey_response_usr_idx : usr

Table: transit_copy

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
source_send_time : timestamp with time zone --
dest_recv_time : timestamp with time zone --
target_copy : bigint -- NOT NULL,
source : integer -- NOT NULL, REFERENCES actor.org_unit.
dest : integer -- NOT NULL, REFERENCES actor.org_unit.
prev_hop : integer -- REFERENCES action.transit_copy.
copy_status : integer -- NOT NULL, REFERENCES config.copy_status.
persistant_transfer : boolean -- NOT NULL, DEFAULT false,
prev_dest : integer -- REFERENCES actor.org_unit.

Indexes: 

active_transit_cp_idx : target_copy
active_transit_dest_idx : dest
active_transit_source_idx : source

Tables referencing action.transit_copy via Foreign Key Constraints: 

action.transit_copy 

View: unfulfilled_hold_innermost_loop

Columns: 

field name : datatype -- parameters, contraints and notes
hold : integer --
circ_lib : integer --
count : bigint --

Table: unfulfilled_hold_list

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
current_copy : bigint -- NOT NULL,
hold : integer -- NOT NULL,
circ_lib : integer -- NOT NULL,
fail_time : timestamp with time zone -- NOT NULL, DEFAULT now(),

Indexes: 

uhr_hold_idx : hold

View: unfulfilled_hold_loops

Columns: 

field name : datatype -- parameters, contraints and notes
hold : integer --
circ_lib : integer --
count : bigint --

View: unfulfilled_hold_max_loop

Columns: 

field name : datatype -- parameters, contraints and notes
hold : integer --
max : bigint --

View: unfulfilled_hold_min_loop

Columns: 

field name : datatype -- parameters, contraints and notes
hold : integer --
min : bigint --

age_circ_on_delete()

Function Properties
Language: PLPGSQL
Return Type: trigger

age_parent_circ_on_delete()

Function Properties
Language: PLPGSQL
Return Type: trigger

apply_fieldset(query integer, pkey_name text, table_name text, fieldset_id text)

Applies a specified fieldset, using a supplied table name and primary key name. The query parameter should be non-null only for query-based fieldsets. Returns NULL if successful, or an error message if not.

Function Properties
Language: PLPGSQL
Return Type: text

archive_stat_cats()

Function Properties
Language: PLPGSQL
Return Type: trigger

circ_chain(ctx_circ_id integer)

Function Properties
Language: PLPGSQL
Return Type: SET OF circulation

circulation_claims_returned()

Function Properties
Language: PLPGSQL
Return Type: trigger

copy_related_hold_stats(copy_id integer)

Function Properties
Language: PLPGSQL
Return Type: hold_stats

fill_circ_copy_location()

Function Properties
Language: PLPGSQL
Return Type: trigger

find_circ_matrix_matchpoint(renewal integer, match_user bigint, match_item integer, context_ou boolean)

Function Properties
Language: PLPGSQL
Return Type: SET OF found_circ_matrix_matchpoint

find_circ_matrix_matchpoint(renewal integer, user_object asset.copy, item_object actor.usr, context_ou boolean)

Function Properties
Language: PLPGSQL
Return Type: found_circ_matrix_matchpoint

find_hold_matrix_matchpoint(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)

Function Properties
Language: PLPGSQL
Return Type: integer

hold_request_permit_test(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)

Function Properties
Language: SQL
Return Type: SET OF matrix_test_result

hold_request_permit_test(retargetting integer, match_requestor integer, match_user bigint, match_item integer, request_ou integer, pickup_ou boolean)

Function Properties
Language: PLPGSQL
Return Type: SET OF matrix_test_result

hold_retarget_permit_test(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)

Function Properties
Language: SQL
Return Type: SET OF matrix_test_result

item_user_circ_test(integer, bigint, integer)

Function Properties
Language: SQL
Return Type: SET OF circ_matrix_test_result

item_user_circ_test(renewal integer, match_user bigint, match_item integer, circ_ou boolean)

Function Properties
Language: PLPGSQL
Return Type: SET OF circ_matrix_test_result

item_user_renew_test(integer, bigint, integer)

Function Properties
Language: SQL
Return Type: SET OF circ_matrix_test_result

purge_circulations()

Function Properties
Language: PLPGSQL
Return Type: integer

push_circ_due_time()

Function Properties
Language: PLPGSQL
Return Type: trigger

summarize_circ_chain(ctx_circ_id integer)

Function Properties
Language: PLPGSQL
Return Type: circ_chain_summary

survey_response_answer_date_fixup()

Function Properties
Language: PLPGSQL
Return Type: trigger

usr_visible_circ_copies(integer)

Function Properties
Language: SQL
Return Type: SET OF bigint

usr_visible_circs(usr_id integer)

Function Properties
Language: PLPGSQL
Return Type: SET OF circulation

usr_visible_holds(usr_id integer)

Function Properties
Language: PLPGSQL
Return Type: SET OF hold_request

Report any errors in this documentation using Launchpad.
Documentation for Evergreen version 2.2
Copyright © 2007-2012, Memebers of the Evergreen Project