Lines 1858-1871
CREATE TABLE `recalls` ( -- information related to recalls in Koha
Link Here
|
1858 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
1858 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
1859 |
`recallnotes` mediumtext, -- notes related to this recall |
1859 |
`recallnotes` mediumtext, -- notes related to this recall |
1860 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
1860 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
1861 |
`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 |
1861 |
`status` 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, C=cancelled, F=finished/completed |
1862 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
1862 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
1863 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
1863 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
1864 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
1864 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
1865 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
1865 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
1866 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
1866 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
|
|
1867 |
`old` int(1) default NULL, -- flag if the recall is old and no longer active, i.e. expired, cancelled or completed |
1867 |
PRIMARY KEY (`recall_id`), |
1868 |
PRIMARY KEY (`recall_id`), |
1868 |
KEY `priorityfoundidx` (priority,found), |
1869 |
KEY `prioritystatusidx` (priority,status), |
1869 |
KEY `borrowernumber` (`borrowernumber`), |
1870 |
KEY `borrowernumber` (`borrowernumber`), |
1870 |
KEY `biblionumber` (`biblionumber`), |
1871 |
KEY `biblionumber` (`biblionumber`), |
1871 |
KEY `itemnumber` (`itemnumber`), |
1872 |
KEY `itemnumber` (`itemnumber`), |
Lines 1879-1916
CREATE TABLE `recalls` ( -- information related to recalls in Koha
Link Here
|
1879 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1880 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1880 |
|
1881 |
|
1881 |
-- |
1882 |
-- |
1882 |
-- Table structure for table `old_recalls` |
|
|
1883 |
-- |
1884 |
|
1885 |
DROP TABLE IF EXISTS `old_recalls`; |
1886 |
CREATE TABLE `old_recalls` ( -- information related to recalls in Koha |
1887 |
`recall_id` int(11) NOT NULL auto_increment, -- primary key |
1888 |
`borrowernumber` int(11) NULL default 0, -- foreign key from the borrowers table defining which patron requested a recall |
1889 |
`recalldate` date default NULL, -- the date the recall request was placed |
1890 |
`biblionumber` int(11) NULL default 0, -- foreign key from the biblio table defining which bib record this request is for |
1891 |
`branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick up their recall from |
1892 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
1893 |
`recallnotes` mediumtext, -- notes related to this recall |
1894 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
1895 |
`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 |
1896 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
1897 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
1898 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
1899 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
1900 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
1901 |
PRIMARY KEY (`recall_id`), |
1902 |
KEY `old_recalls_borrowernumber` (`borrowernumber`), |
1903 |
KEY `old_recalls_biblionumber` (`biblionumber`), |
1904 |
KEY `old_recalls_itemnumber` (`itemnumber`), |
1905 |
KEY `old_recalls_branchcode` (`branchcode`), |
1906 |
KEY `old_recalls_itemtype` (`itemtype`), |
1907 |
CONSTRAINT `old_recalls_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1908 |
CONSTRAINT `old_recalls_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1909 |
CONSTRAINT `old_recalls_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1910 |
CONSTRAINT `old_recalls_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE SET NULL |
1911 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1912 |
|
1913 |
-- |
1914 |
-- Table structure for table `reserves` |
1883 |
-- Table structure for table `reserves` |
1915 |
-- |
1884 |
-- |
1916 |
|
1885 |
|