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