Lines 265-270
CREATE TABLE `borrowers` ( -- this table includes information about your patrons
Link Here
|
265 |
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower |
265 |
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower |
266 |
`smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
266 |
`smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
267 |
`privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history |
267 |
`privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history |
|
|
268 |
`privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts |
268 |
UNIQUE KEY `cardnumber` (`cardnumber`), |
269 |
UNIQUE KEY `cardnumber` (`cardnumber`), |
269 |
PRIMARY KEY `borrowernumber` (`borrowernumber`), |
270 |
PRIMARY KEY `borrowernumber` (`borrowernumber`), |
270 |
KEY `categorycode` (`categorycode`), |
271 |
KEY `categorycode` (`categorycode`), |
Lines 868-873
CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower
Link Here
|
868 |
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower |
869 |
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower |
869 |
`smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
870 |
`smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
870 |
`privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history KEY `borrowernumber` (`borrowernumber`), |
871 |
`privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history KEY `borrowernumber` (`borrowernumber`), |
|
|
872 |
`privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts |
871 |
KEY borrowernumber (borrowernumber), |
873 |
KEY borrowernumber (borrowernumber), |
872 |
KEY `cardnumber` (`cardnumber`) |
874 |
KEY `cardnumber` (`cardnumber`) |
873 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
875 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
Lines 1114-1119
CREATE TABLE `import_items` (
Link Here
|
1114 |
|
1116 |
|
1115 |
DROP TABLE IF EXISTS `issues`; |
1117 |
DROP TABLE IF EXISTS `issues`; |
1116 |
CREATE TABLE `issues` ( -- information related to check outs or issues |
1118 |
CREATE TABLE `issues` ( -- information related to check outs or issues |
|
|
1119 |
`issue_id` int(11) NOT NULL AUTO_INCREMENT, -- primary key for issues table |
1117 |
`borrowernumber` int(11), -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1120 |
`borrowernumber` int(11), -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1118 |
`itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out |
1121 |
`itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out |
1119 |
`date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss) |
1122 |
`date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss) |
Lines 1125-1130
CREATE TABLE `issues` ( -- information related to check outs or issues
Link Here
|
1125 |
`renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed |
1128 |
`renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed |
1126 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1129 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1127 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1130 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
|
|
1131 |
PRIMARY KEY (`issue_id`), |
1128 |
KEY `issuesborridx` (`borrowernumber`), |
1132 |
KEY `issuesborridx` (`borrowernumber`), |
1129 |
KEY `itemnumber_idx` (`itemnumber`), |
1133 |
KEY `itemnumber_idx` (`itemnumber`), |
1130 |
KEY `branchcode_idx` (`branchcode`), |
1134 |
KEY `branchcode_idx` (`branchcode`), |
Lines 1585-1590
CREATE TABLE `oai_sets_biblios` (
Link Here
|
1585 |
|
1589 |
|
1586 |
DROP TABLE IF EXISTS `old_issues`; |
1590 |
DROP TABLE IF EXISTS `old_issues`; |
1587 |
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been returned |
1591 |
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been returned |
|
|
1592 |
`issue_id` int(11) NOT NULL AUTO_INCREMENT, -- primary key for issues table |
1588 |
`borrowernumber` int(11) default NULL, -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1593 |
`borrowernumber` int(11) default NULL, -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1589 |
`itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out |
1594 |
`itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out |
1590 |
`date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) |
1595 |
`date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) |
Lines 1596-1601
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r
Link Here
|
1596 |
`renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed |
1601 |
`renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed |
1597 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1602 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1598 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1603 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
|
|
1604 |
PRIMARY KEY (`issue_id`), |
1599 |
KEY `old_issuesborridx` (`borrowernumber`), |
1605 |
KEY `old_issuesborridx` (`borrowernumber`), |
1600 |
KEY `old_issuesitemidx` (`itemnumber`), |
1606 |
KEY `old_issuesitemidx` (`itemnumber`), |
1601 |
KEY `branchcode_idx` (`branchcode`), |
1607 |
KEY `branchcode_idx` (`branchcode`), |