Lines 193-265
CREATE TABLE `biblioitems` (
Link Here
|
193 |
-- |
193 |
-- |
194 |
|
194 |
|
195 |
DROP TABLE IF EXISTS `borrowers`; |
195 |
DROP TABLE IF EXISTS `borrowers`; |
196 |
CREATE TABLE `borrowers` ( |
196 |
CREATE TABLE `borrowers` ( --this table includes information about your patrons/borrowers/members |
197 |
`borrowernumber` int(11) NOT NULL auto_increment, |
197 |
`borrowernumber` int(11) NOT NULL auto_increment, --primary key, Koha assigned ID number for patrons/borrowers |
198 |
`cardnumber` varchar(16) default NULL, |
198 |
`cardnumber` varchar(16) default NULL, --unique key, library assigned ID number for patrons/borrowers |
199 |
`surname` mediumtext NOT NULL, |
199 |
`surname` mediumtext NOT NULL, --patron/borrower's last name (surname) |
200 |
`firstname` text, |
200 |
`firstname` text, --patron/borrower's first name |
201 |
`title` mediumtext, |
201 |
`title` mediumtext, --patron/borrower's title, for example: Mr. or Mrs. |
202 |
`othernames` mediumtext, |
202 |
`othernames` mediumtext, --any other names associated with the patron/borrower |
203 |
`initials` text, |
203 |
`initials` text, --initials for your patron/borrower |
204 |
`streetnumber` varchar(10) default NULL, |
204 |
`streetnumber` varchar(10) default NULL, --the house number for your patron/borrower's primary address |
205 |
`streettype` varchar(50) default NULL, |
205 |
`streettype` varchar(50) default NULL, --the street type (Rd., Blvd, etc) for your patron/borrower's primary address |
206 |
`address` mediumtext NOT NULL, |
206 |
`address` mediumtext NOT NULL, --the first address line for your patron/borrower's primary address |
207 |
`address2` text, |
207 |
`address2` text, --the second address line for your patron/borrower's primary address |
208 |
`city` mediumtext NOT NULL, |
208 |
`city` mediumtext NOT NULL, --the city or town for your patron/borrower's primary address |
209 |
`state` text default NULL, |
209 |
`state` text default NULL, --the state or province for your patron/borrower's primary address |
210 |
`zipcode` varchar(25) default NULL, |
210 |
`zipcode` varchar(25) default NULL, --the zip or postal code for your patron/borrower's primary address |
211 |
`country` text, |
211 |
`country` text, --the country for your patron/borrower's primary address |
212 |
`email` mediumtext, |
212 |
`email` mediumtext, --the primary email address for your patron/borrower's primary address |
213 |
`phone` text, |
213 |
`phone` text, --the primary phone number for your patron/borrower's primary address |
214 |
`mobile` varchar(50) default NULL, |
214 |
`mobile` varchar(50) default NULL, --the other phone number for your patron/borrower's primary address |
215 |
`fax` mediumtext, |
215 |
`fax` mediumtext, --the fax number for your patron/borrower's primary address |
216 |
`emailpro` text, |
216 |
`emailpro` text, --the secondary email addres for your patron/borrower's primary address |
217 |
`phonepro` text, |
217 |
`phonepro` text, --the secondary phone number for your patron/borrower's primary address |
218 |
`B_streetnumber` varchar(10) default NULL, |
218 |
`B_streetnumber` varchar(10) default NULL --the house number for your patron/borrower's alternate address |
219 |
`B_streettype` varchar(50) default NULL, |
219 |
`B_streettype` varchar(50) default NULL, --the street type (Rd., Blvd, etc) for your patron/borrower's alternate address |
220 |
`B_address` varchar(100) default NULL, |
220 |
`B_address` varchar(100) default NULL, --the first address line for your patron/borrower's alternate address |
221 |
`B_address2` text default NULL, |
221 |
`B_address2` text default NULL, --the second address line for your patron/borrower's alternate address |
222 |
`B_city` mediumtext, |
222 |
`B_city` mediumtext, --the city or town for your patron/borrower's alternate address |
223 |
`B_state` text default NULL, |
223 |
`B_state` text default NULL, --the state for your patron/borrower's alternate address |
224 |
`B_zipcode` varchar(25) default NULL, |
224 |
`B_zipcode` varchar(25) default NULL, --the zip or postal code for your patron/borrower's alternate address |
225 |
`B_country` text, |
225 |
`B_country` text, --the country for your patron/borrower's alternate address |
226 |
`B_email` text, |
226 |
`B_email` text, --the patron/borrower's alternate email address |
227 |
`B_phone` mediumtext, |
227 |
`B_phone` mediumtext, --the patron/borrower's alternate phone number |
228 |
`dateofbirth` date default NULL, |
228 |
`dateofbirth` date default NULL, --the patron/borrower's date of birth (YYYY-MM-DD) |
229 |
`branchcode` varchar(10) NOT NULL default '', |
229 |
`branchcode` varchar(10) NOT NULL default '', --foreign key from the branches table, includes the code of the patron/borrower's home branch |
230 |
`categorycode` varchar(10) NOT NULL default '', |
230 |
`categorycode` varchar(10) NOT NULL default '', --foreign key from the categories table, includes the code of the patron category |
231 |
`dateenrolled` date default NULL, |
231 |
`dateenrolled` date default NULL, --date the patron was added to Koha (YYYY-MM-DD) |
232 |
`dateexpiry` date default NULL, |
232 |
`dateexpiry` date default NULL, --date the patron/borrower's card is set to expire (YYYY-MM-DD) |
233 |
`gonenoaddress` tinyint(1) default NULL, |
233 |
`gonenoaddress` tinyint(1) default NULL, --set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having an unconfirmed address |
234 |
`lost` tinyint(1) default NULL, |
234 |
`lost` tinyint(1) default NULL, --set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as having lost their card |
235 |
`debarred` tinyint(1) default NULL, |
235 |
`debarred` tinyint(1) default NULL, --set to 1 for yes and 0 for no, flag to note that library marked this patron/borrower as being restricted |
236 |
`contactname` mediumtext, |
236 |
`contactname` mediumtext, --used for children and profesionals to include surname or last name of guarentor or organization name |
237 |
`contactfirstname` text, |
237 |
`contactfirstname` text, --used for children to include first name of guarentor |
238 |
`contacttitle` text, |
238 |
`contacttitle` text, --used for children to include title (Mr., Mrs., etc) of guarentor |
239 |
`guarantorid` int(11) default NULL, |
239 |
`guarantorid` int(11) default NULL, --borrowernumber used for children or professionals to link them to guarentors or organizations |
240 |
`borrowernotes` mediumtext, |
240 |
`borrowernotes` mediumtext, --a note on the patron/borroewr's account that is only visible in the staff client |
241 |
`relationship` varchar(100) default NULL, |
241 |
`relationship` varchar(100) default NULL, --used for children to include the relationship to their guarentor |
242 |
`ethnicity` varchar(50) default NULL, |
242 |
`ethnicity` varchar(50) default NULL, --unused in Koha |
243 |
`ethnotes` varchar(255) default NULL, |
243 |
`ethnotes` varchar(255) default NULL, --unused in Koha |
244 |
`sex` varchar(1) default NULL, |
244 |
`sex` varchar(1) default NULL, --patron/borrower's gender |
245 |
`password` varchar(30) default NULL, |
245 |
`password` varchar(30) default NULL, --patron/borrower's encrypted password |
246 |
`flags` int(11) default NULL, |
246 |
`flags` int(11) default NULL, --will include a number associated with the staff member's permissions |
247 |
`userid` varchar(30) default NULL, |
247 |
`userid` varchar(30) default NULL, --patron/borrower's opac and/or staff client log in |
248 |
`opacnote` mediumtext, |
248 |
`opacnote` mediumtext, --a note on the patron/borrower's account that is visible in the OPAC and staff client |
249 |
`contactnote` varchar(255) default NULL, |
249 |
`contactnote` varchar(255) default NULL, --a note related to the patron/borrower's alternate address |
250 |
`sort1` varchar(80) default NULL, |
250 |
`sort1` varchar(80) default NULL, --a field that can be used for any information unique to the library |
251 |
`sort2` varchar(80) default NULL, |
251 |
`sort2` varchar(80) default NULL, --a field that can be used for any information unique to the library |
252 |
`altcontactfirstname` varchar(255) default NULL, |
252 |
`altcontactfirstname` varchar(255) default NULL, --first name of alternate contact for the patron/borrower |
253 |
`altcontactsurname` varchar(255) default NULL, |
253 |
`altcontactsurname` varchar(255) default NULL, --surname or last name of the alternate contact for the patron/borrower |
254 |
`altcontactaddress1` varchar(255) default NULL, |
254 |
`altcontactaddress1` varchar(255) default NULL, --the first address line for the alternate contact for the patron/borrower |
255 |
`altcontactaddress2` varchar(255) default NULL, |
255 |
`altcontactaddress2` varchar(255) default NULL, --the second address line for the alternate contact for the patron/borrower |
256 |
`altcontactaddress3` varchar(255) default NULL, |
256 |
`altcontactaddress3` varchar(255) default NULL, --the third address line for the alternate contact for the patron/borrower |
257 |
`altcontactstate` text default NULL, |
257 |
`altcontactstate` text default NULL, --the city and state for the alternate contact for the patron/borrower |
258 |
`altcontactzipcode` varchar(50) default NULL, |
258 |
`altcontactzipcode` varchar(50) default NULL, --the zipcode for the alternate contact for the patron/borrower |
259 |
`altcontactcountry` text default NULL, |
259 |
`altcontactcountry` text default NULL, --the country for the alternate contact for the patron/borrower |
260 |
`altcontactphone` varchar(50) default NULL, |
260 |
`altcontactphone` varchar(50) default NULL, --the phone number for the alternate contact for the patron/borrower |
261 |
`smsalertnumber` varchar(50) default NULL, |
261 |
`smsalertnumber` varchar(50) default NULL, --the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
262 |
`privacy` integer(11) DEFAULT '1' NOT NULL, |
262 |
`privacy` integer(11) DEFAULT '1' NOT NULL, --patron/borrower's privacy settings related to their reading history |
263 |
UNIQUE KEY `cardnumber` (`cardnumber`), |
263 |
UNIQUE KEY `cardnumber` (`cardnumber`), |
264 |
PRIMARY KEY `borrowernumber` (`borrowernumber`), |
264 |
PRIMARY KEY `borrowernumber` (`borrowernumber`), |
265 |
KEY `categorycode` (`categorycode`), |
265 |
KEY `categorycode` (`categorycode`), |
266 |
- |
|
|