View | Details | Raw Unified | Return to bug 6716
Collapse All | Expand All

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

Return to bug 6716