Lines 920-925
CREATE TABLE `deleteditems` (
Link Here
|
920 |
`replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w) |
920 |
`replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w) |
921 |
`datelastborrowed` date default NULL, -- the date the item was last checked out |
921 |
`datelastborrowed` date default NULL, -- the date the item was last checked out |
922 |
`datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) |
922 |
`datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) |
|
|
923 |
`last_returned_by` int(11) DEFAULT NULL, -- the last borrower to return an item |
923 |
`stack` tinyint(1) default NULL, |
924 |
`stack` tinyint(1) default NULL, |
924 |
`notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7) |
925 |
`notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7) |
925 |
`damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4) |
926 |
`damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4) |
Lines 1222-1227
CREATE TABLE `items` ( -- holdings/item information
Link Here
|
1222 |
`replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w) |
1223 |
`replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w) |
1223 |
`datelastborrowed` date default NULL, -- the date the item was last checked out/issued |
1224 |
`datelastborrowed` date default NULL, -- the date the item was last checked out/issued |
1224 |
`datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) |
1225 |
`datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) |
|
|
1226 |
`last_returned_by` int(11) DEFAULT NULL, -- the last borrower to return an item |
1225 |
`stack` tinyint(1) default NULL, |
1227 |
`stack` tinyint(1) default NULL, |
1226 |
`notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7) |
1228 |
`notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7) |
1227 |
`damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4) |
1229 |
`damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4) |
Lines 1264-1275
CREATE TABLE `items` ( -- holdings/item information
Link Here
|
1264 |
KEY `items_location` (`location`), |
1266 |
KEY `items_location` (`location`), |
1265 |
KEY `items_ccode` (`ccode`), |
1267 |
KEY `items_ccode` (`ccode`), |
1266 |
KEY `itype_idx` (`itype`), |
1268 |
KEY `itype_idx` (`itype`), |
|
|
1269 |
KEY `last_returned_by` (`last_returned_by`), |
1267 |
CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1270 |
CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1268 |
CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE, |
1271 |
CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE, |
1269 |
CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE |
1272 |
CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE |
1270 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1273 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1271 |
|
1274 |
|
1272 |
-- |
1275 |
-- |
|
|
1276 |
-- Table structure for table `items_last_borrower` |
1277 |
-- |
1278 |
|
1279 |
CREATE TABLE IF NOT EXISTS `items_last_borrower` ( |
1280 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
1281 |
`itemnumber` int(11) NOT NULL, |
1282 |
`borrowernumber` int(11) NOT NULL, |
1283 |
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
1284 |
PRIMARY KEY (`id`), |
1285 |
UNIQUE KEY `itemnumber` (`itemnumber`), |
1286 |
KEY `borrowernumber` (`borrowernumber`), |
1287 |
CONSTRAINT `items_last_borrower_ibfk_2` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1288 |
CONSTRAINT `items_last_borrower_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE |
1289 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1290 |
|
1291 |
-- |
1273 |
-- Table structure for table `itemtypes` |
1292 |
-- Table structure for table `itemtypes` |
1274 |
-- |
1293 |
-- |
1275 |
|
1294 |
|