Table testsql_comments.borrowers
this table includes information about your patrons/borrowers/members

Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
borrowernumber int 10  √ 
accountlines.borrowernumber accountlines_ibfk_1 C
accountoffsets.borrowernumber accountoffsets_ibfk_1 C
alert.borrowernumber Implied Constraint R
aqbasketusers.borrowernumber aqbasketusers_ibfk_2 C
aqbudgetborrowers.borrowernumber aqbudgetborrowers_ibfk_2 C
aqorder_users.borrowernumber aqorder_users_ibfk_2 C
article_requests.borrowernumber article_requests_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_modifications.borrowernumber Implied Constraint R
borrower_password_recovery.borrowernumber Implied Constraint R
borrower_sync.borrowernumber borrower_sync_ibfk_1 C
club_enrollments.borrowernumber club_enrollments_ibfk_2 C
course_instructors.borrowernumber course_instructors_ibfk_1 C
creator_batches.borrower_number creator_batches_ibfk_1 C
deletedborrowers.borrowernumber Implied Constraint R
discharges.borrower borrower_discharges_ibfk1 C
hold_fill_targets.borrowernumber hold_fill_targets_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
issues.borrowernumber issues_ibfk_1 R
items_last_borrower.borrowernumber items_last_borrower_ibfk_2 C
linktracker.borrowernumber Implied Constraint R
message_queue.borrowernumber messageq_ibfk_1 C
messages.borrowernumber Implied Constraint R
messages.manager_id messages_ibfk_1 N
notifys.borrowernumber Implied Constraint R
old_issues.borrowernumber old_issues_ibfk_1 N
old_reserves.borrowernumber old_reserves_ibfk_1 N
opac_news.borrowernumber borrowernumber_fk N
patron_list_patrons.borrowernumber patron_list_patrons_ibfk_2 C
patron_lists.owner patron_lists_ibfk_1 C
patronimage.borrowernumber patronimage_fk1 C
ratings.borrowernumber ratings_ibfk_1 C
reserves.borrowernumber reserves_ibfk_1 C
reviews.borrowernumber reviews_ibfk_1 N
saved_sql.borrowernumber Implied Constraint R
statistics.borrowernumber Implied Constraint R
subscriptionroutinglist.borrowernumber subscriptionroutinglist_ibfk_1 C
tags_all.borrowernumber tags_borrowers_fk_1 N
tags_approval.approved_by tags_approval_borrowers_fk_1 N
tmp_holdsqueue.borrowernumber Implied Constraint R
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 16  √  null unique key, library assigned ID number for patrons/borrowers
surname mediumtext 16777215 patron/borrower's last name (surname)
firstname text 65535  √  null patron/borrower's first name
title mediumtext 16777215  √  null patron/borrower's title, for example: Mr. or Mrs.
othernames mediumtext 16777215  √  null any other names associated with the patron/borrower
initials text 65535  √  null initials for your patron/borrower
streetnumber varchar 10  √  null the house number for your patron/borrower's primary address
streettype varchar 50  √  null the street type (Rd., Blvd, etc) for your patron/borrower's primary address
address mediumtext 16777215 the first address line for your patron/borrower's primary address
address2 text 65535  √  null the second address line for your patron/borrower's primary address
city mediumtext 16777215 the city or town for your patron/borrower's primary address
state text 65535  √  null the state or province for your patron/borrower's primary address
zipcode varchar 25  √  null the zip or postal code for your patron/borrower's primary address
country text 65535  √  null the country for your patron/borrower's primary address
email mediumtext 16777215  √  null the primary email address for your patron/borrower's primary address
phone text 65535  √  null the primary phone number for your patron/borrower's primary address
mobile varchar 50  √  null the other phone number for your patron/borrower's primary address
fax mediumtext 16777215  √  null the fax number for your patron/borrower's primary address
emailpro text 65535  √  null the secondary email addres for your patron/borrower's primary address
phonepro text 65535  √  null the secondary phone number for your patron/borrower's primary address
B_streetnumber varchar 10  √  null the house number for your patron/borrower's alternate address
B_streettype varchar 50  √  null the street type (Rd., Blvd, etc) for your patron/borrower's alternate address
B_address varchar 100  √  null the first address line for your patron/borrower's alternate address
B_address2 text 65535  √  null the second address line for your patron/borrower's alternate address
B_city mediumtext 16777215  √  null the city or town for your patron/borrower's alternate address
B_state text 65535  √  null the state for your patron/borrower's alternate address
B_zipcode varchar 25  √  null the zip or postal code for your patron/borrower's alternate address
B_country text 65535  √  null the country for your patron/borrower's alternate address
B_email text 65535  √  null the patron/borrower's alternate email address
B_phone mediumtext 16777215  √  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)
gonenoaddress bit 0  √  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 bit 0  √  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 mediumtext 16777215  √  null used for children and profesionals to include surname or last name of guarantor or organization name
contactfirstname text 65535  √  null used for children to include first name of guarantor
contacttitle text 65535  √  null used for children to include title (Mr., Mrs., etc) of guarantor
guarantorid int 10  √  null borrowernumber used for children or professionals to link them to guarantors or organizations
borrowernotes mediumtext 16777215  √  null a note on the patron/borrower's account that is only visible in the staff client
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
flags int 10  √  null will include a number associated with the staff member's permissions
userid varchar 75  √  null patron/borrower's opac and/or staff client log in
opacnote mediumtext 16777215  √  null a note on the patron/borrower's account that is visible in the OPAC and staff client
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 varchar 255  √  null first name of alternate contact for the patron/borrower
altcontactsurname varchar 255  √  null surname or last name of the alternate contact for the patron/borrower
altcontactaddress1 varchar 255  √  null the first address line for the alternate contact for the patron/borrower
altcontactaddress2 varchar 255  √  null the second address line for the alternate contact for the patron/borrower
altcontactaddress3 varchar 255  √  null the city for the alternate contact for the patron/borrower
altcontactstate text 65535  √  null the state for the alternate contact for the patron/borrower
altcontactzipcode varchar 50  √  null the zipcode for the alternate contact for the patron/borrower
altcontactcountry text 65535  √  null the country for the alternate contact for the patron/borrower
altcontactphone varchar 50  √  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 reading history
privacy_guarantor_checkouts bit 0 0 controls if relatives can see this patron's checkouts
checkprevcheckout varchar 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 seed (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 attemps
overdrive_auth_token text 65535  √  null persist OverDrive auth token

Table contained 0 rows at Mon Jun 26 10:02 NZST 2017

Indexes:
Column(s) Type Sort Constraint Name Anomalies
borrowernumber Primary key Asc PRIMARY  
branchcode Performance Asc branchcode  
cardnumber Must be unique Asc cardnumber This unique column is also nullable
categorycode Performance Asc categorycode  
firstname Performance Asc firstname_idx  
guarantorid Performance Asc guarantorid  
othernames Performance Asc othernames_idx  
sms_provider_id Performance Asc sms_provider_id  
surname Performance Asc surname_idx  
userid Must be unique Asc userid This unique column is also nullable

Close relationships  within of separation: