Lines 184-189
CREATE TABLE `biblioitems` ( -- information related to bibliographic records in
Link Here
|
184 |
PRIMARY KEY (`biblioitemnumber`), |
184 |
PRIMARY KEY (`biblioitemnumber`), |
185 |
KEY `bibinoidx` (`biblioitemnumber`), |
185 |
KEY `bibinoidx` (`biblioitemnumber`), |
186 |
KEY `bibnoidx` (`biblionumber`), |
186 |
KEY `bibnoidx` (`biblionumber`), |
|
|
187 |
KEY `itemtype_idx` (`itemtype`), |
187 |
KEY `isbn` (`isbn`), |
188 |
KEY `isbn` (`isbn`), |
188 |
KEY `issn` (`issn`), |
189 |
KEY `issn` (`issn`), |
189 |
KEY `publishercode` (`publishercode`), |
190 |
KEY `publishercode` (`publishercode`), |
Lines 659-664
CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t
Link Here
|
659 |
PRIMARY KEY (`biblioitemnumber`), |
660 |
PRIMARY KEY (`biblioitemnumber`), |
660 |
KEY `bibinoidx` (`biblioitemnumber`), |
661 |
KEY `bibinoidx` (`biblioitemnumber`), |
661 |
KEY `bibnoidx` (`biblionumber`), |
662 |
KEY `bibnoidx` (`biblionumber`), |
|
|
663 |
KEY `itemtype_idx` (`itemtype`), |
662 |
KEY `isbn` (`isbn`), |
664 |
KEY `isbn` (`isbn`), |
663 |
KEY `publishercode` (`publishercode`) |
665 |
KEY `publishercode` (`publishercode`) |
664 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
666 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
Lines 793-799
CREATE TABLE `deleteditems` (
Link Here
|
793 |
KEY `delitembinoidx` (`biblioitemnumber`), |
795 |
KEY `delitembinoidx` (`biblioitemnumber`), |
794 |
KEY `delitembibnoidx` (`biblionumber`), |
796 |
KEY `delitembibnoidx` (`biblionumber`), |
795 |
KEY `delhomebranch` (`homebranch`), |
797 |
KEY `delhomebranch` (`homebranch`), |
796 |
KEY `delholdingbranch` (`holdingbranch`) |
798 |
KEY `delholdingbranch` (`holdingbranch`), |
|
|
799 |
KEY `itype_idx` (`itype`) |
797 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
800 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
798 |
|
801 |
|
799 |
-- |
802 |
-- |
Lines 991-996
CREATE TABLE `issues` ( -- information related to check outs or issues
Link Here
|
991 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
994 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched |
992 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
995 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
993 |
KEY `issuesborridx` (`borrowernumber`), |
996 |
KEY `issuesborridx` (`borrowernumber`), |
|
|
997 |
KEY `itemnumber_idx` (`itemnumber`), |
998 |
KEY `branchcode_idx` (`branchcode`), |
999 |
KEY `issuingbranch_idx` (`issuingbranch`), |
994 |
KEY `bordate` (`borrowernumber`,`timestamp`), |
1000 |
KEY `bordate` (`borrowernumber`,`timestamp`), |
995 |
CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE, |
1001 |
CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE, |
996 |
CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE |
1002 |
CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE |
Lines 1084-1089
CREATE TABLE `items` ( -- holdings/item information
Link Here
|
1084 |
KEY `itemcallnumber` (`itemcallnumber`), |
1090 |
KEY `itemcallnumber` (`itemcallnumber`), |
1085 |
KEY `items_location` (`location`), |
1091 |
KEY `items_location` (`location`), |
1086 |
KEY `items_ccode` (`ccode`), |
1092 |
KEY `items_ccode` (`ccode`), |
|
|
1093 |
KEY `itype_idx` (`itype`), |
1087 |
CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1094 |
CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1088 |
CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE, |
1095 |
CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE, |
1089 |
CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE |
1096 |
CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE |
Lines 1448-1453
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r
Link Here
|
1448 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1455 |
`issuedate` datetime default NULL, -- date the item was checked out or issued |
1449 |
KEY `old_issuesborridx` (`borrowernumber`), |
1456 |
KEY `old_issuesborridx` (`borrowernumber`), |
1450 |
KEY `old_issuesitemidx` (`itemnumber`), |
1457 |
KEY `old_issuesitemidx` (`itemnumber`), |
|
|
1458 |
KEY `branchcode_idx` (`branchcode`), |
1459 |
KEY `issuingbranch_idx` (`issuingbranch`), |
1451 |
KEY `old_bordate` (`borrowernumber`,`timestamp`), |
1460 |
KEY `old_bordate` (`borrowernumber`,`timestamp`), |
1452 |
CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) |
1461 |
CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) |
1453 |
ON DELETE SET NULL ON UPDATE SET NULL, |
1462 |
ON DELETE SET NULL ON UPDATE SET NULL, |
Lines 1841-1847
CREATE TABLE `statistics` ( -- information related to transactions (circulation
Link Here
|
1841 |
`borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower |
1850 |
`borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower |
1842 |
`associatedborrower` int(11) default NULL, |
1851 |
`associatedborrower` int(11) default NULL, |
1843 |
`ccode` varchar(10) default NULL, -- foreign key from the items table, links transaction to a specific collection code |
1852 |
`ccode` varchar(10) default NULL, -- foreign key from the items table, links transaction to a specific collection code |
1844 |
KEY `timeidx` (`datetime`) |
1853 |
KEY `timeidx` (`datetime`), |
|
|
1854 |
KEY `branch_idx` (`branch`), |
1855 |
KEY `proccode_idx` (`proccode`), |
1856 |
KEY `type_idx` (`type`), |
1857 |
KEY `usercode_idx` (`usercode`), |
1858 |
KEY `itemnumber_idx` (`itemnumber`), |
1859 |
KEY `itemtype_idx` (`itemtype`), |
1860 |
KEY `borrowernumber_idx` (`borrowernumber`), |
1861 |
KEY `associatedborrower_idx` (`associatedborrower`), |
1862 |
KEY `ccode_idx` (`ccode`) |
1845 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1863 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
1846 |
|
1864 |
|
1847 |
-- |
1865 |
-- |