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