Lines 996-1040
CREATE TABLE `issuingrules` (
Link Here
|
996 |
-- |
996 |
-- |
997 |
|
997 |
|
998 |
DROP TABLE IF EXISTS `items`; |
998 |
DROP TABLE IF EXISTS `items`; |
999 |
CREATE TABLE `items` ( |
999 |
CREATE TABLE `items` ( -- holdings/item information |
1000 |
`itemnumber` int(11) NOT NULL auto_increment, |
1000 |
`itemnumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier added by Koha |
1001 |
`biblionumber` int(11) NOT NULL default 0, |
1001 |
`biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record |
1002 |
`biblioitemnumber` int(11) NOT NULL default 0, |
1002 |
`biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information |
1003 |
`barcode` varchar(20) default NULL, |
1003 |
`barcode` varchar(20) default NULL, -- item barcode (952$p) |
1004 |
`dateaccessioned` date default NULL, |
1004 |
`dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (952$d) |
1005 |
`booksellerid` mediumtext default NULL, |
1005 |
`booksellerid` mediumtext default NULL, -- where the item was purchased (952$e) |
1006 |
`homebranch` varchar(10) default NULL, |
1006 |
`homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (952$a) |
1007 |
`price` decimal(8,2) default NULL, |
1007 |
`price` decimal(8,2) default NULL, -- purchase price (952$g) |
1008 |
`replacementprice` decimal(8,2) default NULL, |
1008 |
`replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (952$v) |
1009 |
`replacementpricedate` date default NULL, |
1009 |
`replacementpricedate` date default NULL, -- the date the price is effective from (952$w) |
1010 |
`datelastborrowed` date default NULL, |
1010 |
`datelastborrowed` date default NULL, -- the date the item was last checked out |
1011 |
`datelastseen` date default NULL, |
1011 |
`datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done) |
1012 |
`stack` tinyint(1) default NULL, |
1012 |
`stack` tinyint(1) default NULL, |
1013 |
`notforloan` tinyint(1) NOT NULL default 0, |
1013 |
`notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (952$7) |
1014 |
`damaged` tinyint(1) NOT NULL default 0, |
1014 |
`damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (952$4) |
1015 |
`itemlost` tinyint(1) NOT NULL default 0, |
1015 |
`itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (952$1) |
1016 |
`wthdrawn` tinyint(1) NOT NULL default 0, |
1016 |
`wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (952$0) |
1017 |
`itemcallnumber` varchar(255) default NULL, |
1017 |
`itemcallnumber` varchar(255) default NULL, -- call number for this item (952$o) |
1018 |
`issues` smallint(6) default NULL, |
1018 |
`issues` smallint(6) default NULL, -- number of times this item has been checked out |
1019 |
`renewals` smallint(6) default NULL, |
1019 |
`renewals` smallint(6) default NULL, -- number of times this item has been renewed |
1020 |
`reserves` smallint(6) default NULL, |
1020 |
`reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved |
1021 |
`restricted` tinyint(1) default NULL, |
1021 |
`restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (952$5) |
1022 |
`itemnotes` mediumtext, |
1022 |
`itemnotes` mediumtext, -- public notes on this item (952$x) |
1023 |
`holdingbranch` varchar(10) default NULL, |
1023 |
`holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (952$b) |
1024 |
`paidfor` mediumtext, |
1024 |
`paidfor` mediumtext, |
1025 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
1025 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered |
1026 |
`location` varchar(80) default NULL, |
1026 |
`location` varchar(80) default NULL, -- authorized value for the shelving location for this item (952$c) |
1027 |
`permanent_location` varchar(80) default NULL, |
1027 |
`permanent_location` varchar(80) default NULL, |
1028 |
`onloan` date default NULL, |
1028 |
`onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no) |
1029 |
`cn_source` varchar(10) default NULL, |
1029 |
`cn_source` varchar(10) default NULL, -- classification source used on this item (952$2) |
1030 |
`cn_sort` varchar(30) default NULL, |
1030 |
`cn_sort` varchar(30) default NULL, |
1031 |
`ccode` varchar(10) default NULL, |
1031 |
`ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (952$8) |
1032 |
`materials` varchar(10) default NULL, |
1032 |
`materials` varchar(10) default NULL, -- materials specified (952$3) |
1033 |
`uri` varchar(255) default NULL, |
1033 |
`uri` varchar(255) default NULL, -- URL for the item (952$u) |
1034 |
`itype` varchar(10) default NULL, |
1034 |
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (952$y) |
1035 |
`more_subfields_xml` longtext default NULL, |
1035 |
`more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format |
1036 |
`enumchron` text default NULL, |
1036 |
`enumchron` text default NULL, -- serial enumeration/chronology for the item (952$h) |
1037 |
`copynumber` varchar(32) default NULL, |
1037 |
`copynumber` varchar(32) default NULL, -- copy number (952$t) |
1038 |
`stocknumber` varchar(32) default NULL, |
1038 |
`stocknumber` varchar(32) default NULL, |
1039 |
PRIMARY KEY (`itemnumber`), |
1039 |
PRIMARY KEY (`itemnumber`), |
1040 |
UNIQUE KEY `itembarcodeidx` (`barcode`), |
1040 |
UNIQUE KEY `itembarcodeidx` (`barcode`), |
1041 |
- |
|
|