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 894-899
CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower
Link Here
|
894 |
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower |
895 |
`altcontactphone` varchar(50) default NULL, -- the phone number for the alternate contact for the patron/borrower |
895 |
`smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
896 |
`smsalertnumber` varchar(50) default NULL, -- the mobile phone number where the patron/borrower would like to receive notices (if SNS turned on) |
896 |
`privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history KEY `borrowernumber` (`borrowernumber`), |
897 |
`privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history KEY `borrowernumber` (`borrowernumber`), |
|
|
898 |
`privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts |
897 |
KEY borrowernumber (borrowernumber), |
899 |
KEY borrowernumber (borrowernumber), |
898 |
KEY `cardnumber` (`cardnumber`) |
900 |
KEY `cardnumber` (`cardnumber`) |
899 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
901 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
Lines 1140-1145
CREATE TABLE `import_items` (
Link Here
|
1140 |
|
1142 |
|
1141 |
DROP TABLE IF EXISTS `issues`; |
1143 |
DROP TABLE IF EXISTS `issues`; |
1142 |
CREATE TABLE `issues` ( -- information related to check outs or issues |
1144 |
CREATE TABLE `issues` ( -- information related to check outs or issues |
|
|
1145 |
`issue_id` int(11) NOT NULL AUTO_INCREMENT, -- primary key for issues table |
1143 |
`borrowernumber` int(11), -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1146 |
`borrowernumber` int(11), -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1144 |
`itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out |
1147 |
`itemnumber` int(11), -- foreign key, linking this to the items table for the item that was checked out |
1145 |
`date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss) |
1148 |
`date_due` datetime default NULL, -- datetime the item is due (yyyy-mm-dd hh:mm::ss) |
Lines 1153-1158
CREATE TABLE `issues` ( -- information related to check outs or issues
Link Here
|
1153 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1156 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1154 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1157 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1155 |
`onsite_checkout` int(1) NOT NULL default 0, -- in house use flag |
1158 |
`onsite_checkout` int(1) NOT NULL default 0, -- in house use flag |
|
|
1159 |
PRIMARY KEY (`issue_id`), |
1156 |
KEY `issuesborridx` (`borrowernumber`), |
1160 |
KEY `issuesborridx` (`borrowernumber`), |
1157 |
KEY `itemnumber_idx` (`itemnumber`), |
1161 |
KEY `itemnumber_idx` (`itemnumber`), |
1158 |
KEY `branchcode_idx` (`branchcode`), |
1162 |
KEY `branchcode_idx` (`branchcode`), |
Lines 1614-1619
CREATE TABLE `oai_sets_biblios` (
Link Here
|
1614 |
|
1618 |
|
1615 |
DROP TABLE IF EXISTS `old_issues`; |
1619 |
DROP TABLE IF EXISTS `old_issues`; |
1616 |
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been returned |
1620 |
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been returned |
|
|
1621 |
`issue_id` int(11) NOT NULL AUTO_INCREMENT, -- primary key for issues table |
1617 |
`borrowernumber` int(11) default NULL, -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1622 |
`borrowernumber` int(11) default NULL, -- foreign key, linking this to the borrowers table for the patron this item was checked out to |
1618 |
`itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out |
1623 |
`itemnumber` int(11) default NULL, -- foreign key, linking this to the items table for the item that was checked out |
1619 |
`date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) |
1624 |
`date_due` datetime default NULL, -- date the item is due (yyyy-mm-dd) |
Lines 1627-1632
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r
Link Here
|
1627 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1632 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
1628 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1633 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1629 |
`onsite_checkout` int(1) NOT NULL default 0, -- in house use flag |
1634 |
`onsite_checkout` int(1) NOT NULL default 0, -- in house use flag |
|
|
1635 |
PRIMARY KEY (`issue_id`), |
1630 |
KEY `old_issuesborridx` (`borrowernumber`), |
1636 |
KEY `old_issuesborridx` (`borrowernumber`), |
1631 |
KEY `old_issuesitemidx` (`itemnumber`), |
1637 |
KEY `old_issuesitemidx` (`itemnumber`), |
1632 |
KEY `branchcode_idx` (`branchcode`), |
1638 |
KEY `branchcode_idx` (`branchcode`), |