Lines 1883-1896
CREATE TABLE `recalls` ( -- information related to recalls in Koha
Link Here
|
1883 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
1883 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
1884 |
`recallnotes` mediumtext, -- notes related to this recall |
1884 |
`recallnotes` mediumtext, -- notes related to this recall |
1885 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
1885 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
1886 |
`found` varchar(1) default NULL, -- a one letter code defining what the status is of the recall is after it has been requested. R=requested, O=overdue, W=awaiting pickup, E=expired |
1886 |
`found` varchar(1) default NULL, -- a one letter code defining what the status is of the recall is after it has been requested. R=requested, O=overdue, W=awaiting pickup, E=expired, F=finished/completed |
1887 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
1887 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
1888 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
1888 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
1889 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
1889 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
1890 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
1890 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
1891 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
1891 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
|
|
1892 |
`old` int(1) default NULL, -- flag if the recall is old and no longer active, i.e. expired, cancelled or completed |
1892 |
PRIMARY KEY (`recall_id`), |
1893 |
PRIMARY KEY (`recall_id`), |
1893 |
KEY `priorityfoundidx` (priority,found), |
1894 |
KEY `prioritystatusidx` (priority,status), |
1894 |
KEY `borrowernumber` (`borrowernumber`), |
1895 |
KEY `borrowernumber` (`borrowernumber`), |
1895 |
KEY `biblionumber` (`biblionumber`), |
1896 |
KEY `biblionumber` (`biblionumber`), |
1896 |
KEY `itemnumber` (`itemnumber`), |
1897 |
KEY `itemnumber` (`itemnumber`), |
Lines 1903-1940
CREATE TABLE `recalls` ( -- information related to recalls in Koha
Link Here
|
1903 |
CONSTRAINT `recalls_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE |
1904 |
CONSTRAINT `recalls_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE |
1904 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1905 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1905 |
|
1906 |
|
1906 |
-- |
|
|
1907 |
-- Table structure for table `old_recalls` |
1908 |
-- |
1909 |
|
1910 |
DROP TABLE IF EXISTS `old_recalls`; |
1911 |
CREATE TABLE `old_recalls` ( -- information related to recalls in Koha |
1912 |
`recall_id` int(11) NOT NULL auto_increment, -- primary key |
1913 |
`borrowernumber` int(11) NULL default 0, -- foreign key from the borrowers table defining which patron requested a recall |
1914 |
`recalldate` date default NULL, -- the date the recall request was placed |
1915 |
`biblionumber` int(11) NULL default 0, -- foreign key from the biblio table defining which bib record this request is for |
1916 |
`branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick up their recall from |
1917 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
1918 |
`recallnotes` mediumtext, -- notes related to this recall |
1919 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
1920 |
`found` varchar(1) default NULL, -- a one letter code defining what the status is of the recall is after it has been requested. R=requested, O=overdue, W=awaiting pickup, E=expired |
1921 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
1922 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
1923 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
1924 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
1925 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
1926 |
PRIMARY KEY (`recall_id`), |
1927 |
KEY `old_recalls_borrowernumber` (`borrowernumber`), |
1928 |
KEY `old_recalls_biblionumber` (`biblionumber`), |
1929 |
KEY `old_recalls_itemnumber` (`itemnumber`), |
1930 |
KEY `old_recalls_branchcode` (`branchcode`), |
1931 |
KEY `old_recalls_itemtype` (`itemtype`), |
1932 |
CONSTRAINT `old_recalls_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1933 |
CONSTRAINT `old_recalls_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1934 |
CONSTRAINT `old_recalls_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1935 |
CONSTRAINT `old_recalls_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE SET NULL |
1936 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1937 |
|
1938 |
-- |
1907 |
-- |
1939 |
-- Table structure for table `reserves` |
1908 |
-- Table structure for table `reserves` |
1940 |
-- |
1909 |
-- |