Lines 1-3
Link Here
|
|
|
1 |
DROP TABLE IF EXISTS `old_recalls`; |
1 |
DROP TABLE IF EXISTS `recalls`; |
2 |
DROP TABLE IF EXISTS `recalls`; |
2 |
CREATE TABLE `recalls` ( -- information related to recalls in Koha |
3 |
CREATE TABLE `recalls` ( -- information related to recalls in Koha |
3 |
`recall_id` int(11) NOT NULL auto_increment, -- primary key |
4 |
`recall_id` int(11) NOT NULL auto_increment, -- primary key |
Lines 8-21
CREATE TABLE `recalls` ( -- information related to recalls in Koha
Link Here
|
8 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
9 |
`cancellationdate` date default NULL, -- the date this recall was cancelled |
9 |
`recallnotes` mediumtext, -- notes related to this recall |
10 |
`recallnotes` mediumtext, -- notes related to this recall |
10 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
11 |
`priority` smallint(6) default NULL, -- where in the queue the patron sits |
11 |
`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 |
12 |
`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 |
12 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
13 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this recall was last updated |
13 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
14 |
`itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the recall request was placed on |
14 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
15 |
`waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library |
15 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
16 |
`expirationdate` DATE DEFAULT NULL, -- the date the recall expires |
16 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
17 |
`itemtype` VARCHAR(10) NULL DEFAULT NULL, -- the optional itemtype of the item the patron is requesting |
|
|
18 |
`old` int(1) default null, -- flag if the recall is old and no longer active, i.e. expired or cancelled |
17 |
PRIMARY KEY (`recall_id`), |
19 |
PRIMARY KEY (`recall_id`), |
18 |
KEY `priorityfoundidx` (priority,found), |
20 |
KEY `prioritystatusidx` (priority,status), |
19 |
KEY `borrowernumber` (`borrowernumber`), |
21 |
KEY `borrowernumber` (`borrowernumber`), |
20 |
KEY `biblionumber` (`biblionumber`), |
22 |
KEY `biblionumber` (`biblionumber`), |
21 |
KEY `itemnumber` (`itemnumber`), |
23 |
KEY `itemnumber` (`itemnumber`), |
22 |
- |
|
|