borrowers

0 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
borrowernumber INT 10 √ null
accountlines.borrowernumber accountlines_ibfk_borrowers N
accountlines.manager_id accountlines_ibfk_borrowers_2 N
additional_contents.borrowernumber borrowernumber_fk N
advanced_editor_macros.borrowernumber borrower_macro_fk C
alert.borrowernumber alert_ibfk_1 C
api_keys.patron_id api_keys_fk_patron_id C
aqbasketusers.borrowernumber aqbasketusers_ibfk_2 C
aqbudgetborrowers.borrowernumber aqbudgetborrowers_ibfk_2 C
aqorder_users.borrowernumber aqorder_users_ibfk_2 C
aqorders.created_by aqorders_created_by N
article_requests.borrowernumber article_requests_ibfk_1 C
bookings.patron_id bookings_ibfk_1 C
borrower_attributes.borrowernumber borrower_attributes_ibfk_1 C
borrower_debarments.borrowernumber borrower_debarments_ibfk_1 C
borrower_files.borrowernumber borrower_files_ibfk_1 C
borrower_message_preferences.borrowernumber borrower_message_preferences_ibfk_1 C
borrower_relationships.guarantee_id r_guarantee C
borrower_relationships.guarantor_id r_guarantor C
cash_register_actions.manager_id cash_register_actions_manager C
checkout_renewals.renewer_id renewals_renewer_id N
club_enrollments.borrowernumber club_enrollments_ibfk_2 C
club_holds_to_patron_holds.patron_id clubs_holds_paton_holds_ibfk_2 C
course_instructors.borrowernumber course_instructors_ibfk_1 C
creator_batches.borrower_number creator_batches_ibfk_1 C
curbside_pickups.borrowernumber curbside_pickups_ibfk_2 C
curbside_pickups.staged_by curbside_pickups_ibfk_3 N
discharges.borrower borrower_discharges_ibfk1 C
erm_counter_logs.borrowernumber erm_counter_log_ibfk_1 C
erm_user_roles.user_id erm_user_roles_ibfk_3 C
hold_fill_targets.borrowernumber hold_fill_targets_ibfk_1 C
hold_groups.borrowernumber hold_groups_ibfk_1 C
housebound_profile.borrowernumber housebound_profile_bnfk C
housebound_role.borrowernumber_id houseboundrole_bnfk C
housebound_visit.chooser_brwnumber houseboundvisit_bnfk_1 C
housebound_visit.deliverer_brwnumber houseboundvisit_bnfk_2 C
illbatches.patron_id illbatches_bnfk N
illcomments.borrowernumber illcomments_bnfk C
illrequests.borrowernumber illrequests_bnfk N
issues.borrowernumber issues_ibfk_1 R
issues.issuer_id issues_ibfk_borrowers_borrowernumber N
item_editor_templates.patron_id bn N
items_last_borrower.borrowernumber items_last_borrower_ibfk_2 C
linktracker.borrowernumber linktracker_borrower_ibfk N
message_queue.borrowernumber messageq_ibfk_1 C
messages.borrowernumber messages_borrowernumber C
messages.manager_id messages_ibfk_1 N
old_issues.borrowernumber old_issues_ibfk_1 N
old_issues.issuer_id old_issues_ibfk_borrowers_borrowernumber N
old_reserves.borrowernumber old_reserves_ibfk_1 N
patron_consent.borrowernumber patron_consent_ibfk_1 C
patron_list_patrons.borrowernumber patron_list_patrons_ibfk_2 C
patron_lists.owner patron_lists_ibfk_1 C
patronimage.borrowernumber patronimage_fk1 C
problem_reports.borrowernumber problem_reports_ibfk1 C
ratings.borrowernumber ratings_ibfk_1 C
recalls.patron_id recalls_ibfk_1 C
reserves.borrowernumber reserves_ibfk_1 C
return_claims.borrowernumber rc_borrowers_ibfk C
return_claims.created_by rc_created_by_ibfk N
return_claims.resolved_by rc_resolved_by_ibfk N
return_claims.updated_by rc_updated_by_ibfk N
reviews.borrowernumber reviews_ibfk_1 N
subscriptionroutinglist.borrowernumber subscriptionroutinglist_ibfk_1 C
suggestions.acceptedby suggestions_ibfk_acceptedby N
suggestions.lastmodificationby suggestions_ibfk_lastmodificationby N
suggestions.managedby suggestions_ibfk_managedby N
suggestions.rejectedby suggestions_ibfk_rejectedby N
suggestions.suggestedby suggestions_ibfk_suggestedby N
tags_all.borrowernumber tags_borrowers_fk_1 N
tags_approval.approved_by tags_approval_borrowers_fk_1 N
ticket_updates.assignee_id ticket_updates_ibfk_3 C
ticket_updates.user_id ticket_updates_ibfk_2 C
tickets.assignee_id tickets_ibfk_4 C
tickets.reporter_id tickets_ibfk_1 C
tickets.resolver_id tickets_ibfk_2 C
tmp_holdsqueue.borrowernumber tmp_holdsqueue_ibfk_3 C
user_permissions.borrowernumber user_permissions_ibfk_1 C
virtualshelfcontents.borrowernumber shelfcontents_ibfk_3 N
virtualshelfshares.borrowernumber virtualshelfshares_ibfk_2 N
virtualshelves.owner virtualshelves_ibfk_1 N

primary key, Koha assigned ID number for patrons/borrowers

cardnumber VARCHAR 32 √ NULL

unique key, library assigned ID number for patrons/borrowers

surname LONGTEXT 2147483647 √ NULL

patron/borrower’s last name (surname)

firstname MEDIUMTEXT 16777215 √ NULL

patron/borrower’s first name

preferred_name LONGTEXT 2147483647 √ NULL

patron/borrower’s preferred name

middle_name LONGTEXT 2147483647 √ NULL

patron/borrower’s middle name

title LONGTEXT 2147483647 √ NULL

patron/borrower’s title, for example: Mr. or Mrs.

othernames LONGTEXT 2147483647 √ NULL

any other names associated with the patron/borrower

initials MEDIUMTEXT 16777215 √ NULL

initials for your patron/borrower

pronouns LONGTEXT 2147483647 √ NULL

patron/borrower pronouns

streetnumber TINYTEXT 255 √ NULL

the house number for your patron/borrower’s primary address

streettype TINYTEXT 255 √ NULL

the street type (Rd., Blvd, etc) for your patron/borrower’s primary address

address LONGTEXT 2147483647 √ NULL

the first address line for your patron/borrower’s primary address

address2 MEDIUMTEXT 16777215 √ NULL

the second address line for your patron/borrower’s primary address

city LONGTEXT 2147483647 √ NULL

the city or town for your patron/borrower’s primary address

state MEDIUMTEXT 16777215 √ NULL

the state or province for your patron/borrower’s primary address

zipcode TINYTEXT 255 √ NULL

the zip or postal code for your patron/borrower’s primary address

country MEDIUMTEXT 16777215 √ NULL

the country for your patron/borrower’s primary address

email LONGTEXT 2147483647 √ NULL

the primary email address for your patron/borrower’s primary address

phone MEDIUMTEXT 16777215 √ NULL

the primary phone number for your patron/borrower’s primary address

mobile TINYTEXT 255 √ NULL

the other phone number for your patron/borrower’s primary address

fax LONGTEXT 2147483647 √ NULL

the fax number for your patron/borrower’s primary address

emailpro MEDIUMTEXT 16777215 √ NULL

the secondary email address for your patron/borrower’s primary address

phonepro MEDIUMTEXT 16777215 √ NULL

the secondary phone number for your patron/borrower’s primary address

B_streetnumber TINYTEXT 255 √ NULL

the house number for your patron/borrower’s alternate address

B_streettype TINYTEXT 255 √ NULL

the street type (Rd., Blvd, etc) for your patron/borrower’s alternate address

B_address MEDIUMTEXT 16777215 √ NULL

the first address line for your patron/borrower’s alternate address

B_address2 MEDIUMTEXT 16777215 √ NULL

the second address line for your patron/borrower’s alternate address

B_city LONGTEXT 2147483647 √ NULL

the city or town for your patron/borrower’s alternate address

B_state MEDIUMTEXT 16777215 √ NULL

the state for your patron/borrower’s alternate address

B_zipcode TINYTEXT 255 √ NULL

the zip or postal code for your patron/borrower’s alternate address

B_country MEDIUMTEXT 16777215 √ NULL

the country for your patron/borrower’s alternate address

B_email MEDIUMTEXT 16777215 √ NULL

the patron/borrower’s alternate email address

B_phone LONGTEXT 2147483647 √ NULL

the patron/borrower’s alternate phone number

dateofbirth DATE 10 √ NULL

the patron/borrower’s date of birth (YYYY-MM-DD)

branchcode VARCHAR 10 ''
branches.branchcode borrowers_ibfk_2 R

foreign key from the branches table, includes the code of the patron/borrower’s home branch

categorycode VARCHAR 10 ''
categories.categorycode borrowers_ibfk_1 R

foreign key from the categories table, includes the code of the patron category

dateenrolled DATE 10 √ NULL

date the patron was added to Koha (YYYY-MM-DD)

dateexpiry DATE 10 √ NULL

date the patron/borrower’s card is set to expire (YYYY-MM-DD)

password_expiration_date DATE 10 √ NULL

date the patron/borrower’s password is set to expire (YYYY-MM-DD)

date_renewed DATE 10 √ NULL

date the patron/borrower’s card was last renewed

gonenoaddress TINYINT 3 √ NULL

set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address

lost TINYINT 3 √ NULL

set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card

debarred DATE 10 √ NULL

until this date the patron can only check-in (no loans, no holds, etc.), is a fine based on days instead of money (YYYY-MM-DD)

debarredcomment VARCHAR 255 √ NULL

comment on the stop of the patron

contactname LONGTEXT 2147483647 √ NULL

used for children and professionals to include surname or last name of guarantor or organization name

contactfirstname MEDIUMTEXT 16777215 √ NULL

used for children to include first name of guarantor

contacttitle MEDIUMTEXT 16777215 √ NULL

used for children to include title (Mr., Mrs., etc) of guarantor

borrowernotes LONGTEXT 2147483647 √ NULL

a note on the patron/borrower’s account that is only visible in the staff interface

relationship VARCHAR 100 √ NULL

used for children to include the relationship to their guarantor

sex VARCHAR 1 √ NULL

patron/borrower’s gender

password VARCHAR 60 √ NULL

patron/borrower’s Bcrypt encrypted password

secret MEDIUMTEXT 16777215 √ NULL

Secret for 2FA

auth_method enum('password', 'two-factor') 10 'password'

Authentication method

flags BIGINT 19 √ NULL

will include a number associated with the staff member’s permissions

userid VARCHAR 75 √ NULL

patron/borrower’s opac and/or staff interface log in

opacnote LONGTEXT 2147483647 √ NULL

a note on the patron/borrower’s account that is visible in the OPAC and staff interface

contactnote VARCHAR 255 √ NULL

a note related to the patron/borrower’s alternate address

sort1 VARCHAR 80 √ NULL

a field that can be used for any information unique to the library

sort2 VARCHAR 80 √ NULL

a field that can be used for any information unique to the library

altcontactfirstname MEDIUMTEXT 16777215 √ NULL

first name of alternate contact for the patron/borrower

altcontactsurname MEDIUMTEXT 16777215 √ NULL

surname or last name of the alternate contact for the patron/borrower

altcontactaddress1 MEDIUMTEXT 16777215 √ NULL

the first address line for the alternate contact for the patron/borrower

altcontactaddress2 MEDIUMTEXT 16777215 √ NULL

the second address line for the alternate contact for the patron/borrower

altcontactaddress3 MEDIUMTEXT 16777215 √ NULL

the city for the alternate contact for the patron/borrower

altcontactstate MEDIUMTEXT 16777215 √ NULL

the state for the alternate contact for the patron/borrower

altcontactzipcode MEDIUMTEXT 16777215 √ NULL

the zipcode for the alternate contact for the patron/borrower

altcontactcountry MEDIUMTEXT 16777215 √ NULL

the country for the alternate contact for the patron/borrower

altcontactphone MEDIUMTEXT 16777215 √ NULL

the phone number for the alternate contact for the patron/borrower

smsalertnumber VARCHAR 50 √ NULL

the mobile phone number where the patron/borrower would like to receive notices (if SMS turned on)

sms_provider_id INT 10 √ NULL
sms_providers.id borrowers_ibfk_3 N

the provider of the mobile phone number defined in smsalertnumber

privacy INT 10 1

patron/borrower’s privacy settings related to their checkout history

privacy_guarantor_fines TINYINT 3 0

controls if relatives can see this patron’s fines

privacy_guarantor_checkouts TINYINT 3 0

controls if relatives can see this patron’s checkouts

checkprevcheckout enum('yes', 'no', 'inherit') 7 'inherit'

produce a warning for this patron if this item has previously been checked out to this patron if ‘yes’, not if ‘no’, defer to category setting if ‘inherit’.

updated_on TIMESTAMP 19 current_timestamp()

time of last change could be useful for synchronization with external systems (among others)

lastseen DATETIME 19 √ NULL

last time a patron has been seen (connected at the OPAC or staff interface)

lang VARCHAR 25 'default'

lang to use to send notices to this patron

login_attempts INT 10 0

number of failed login attempts

overdrive_auth_token MEDIUMTEXT 16777215 √ NULL

persist OverDrive auth token

anonymized TINYINT 3 0

flag for data anonymization

autorenew_checkouts TINYINT 3 1

flag for allowing auto-renewal

primary_contact_method VARCHAR 45 √ NULL

useful for reporting purposes

protected TINYINT 3 0

boolean flag to mark selected patrons as protected from deletion

Indexes

Constraint Name Type Sort Column(s)
borrowers_s_pk Primary key Asc borrowernumber
branchcode Performance Asc branchcode
cardnumber Must be unique Asc cardnumber
cardnumber_idx Performance Asc cardnumber
categorycode Performance Asc categorycode
firstname_idx Performance Asc firstname
idx_borrowers_sort_order Performance Asc/Asc/Asc/Asc/Asc/Asc/Asc/Asc/Asc/Asc/Asc/Asc surname + preferred_name + firstname + middle_name + othernames + streetnumber + address + address2 + city + state + zipcode + country
middle_name_idx Performance Asc middle_name
othernames_idx Performance Asc othernames
preferred_name_idx Performance Asc preferred_name
PRIMARY Must be unique Asc borrowernumber
sms_provider_id Performance Asc sms_provider_id
surname_idx Performance Asc surname
userid Must be unique Asc userid
userid_idx Performance Asc userid

Relationships