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

(-)a/installer/data/mysql/kohastructure.sql (-37 / +36 lines)
Lines 731-776 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
731
731
732
DROP TABLE IF EXISTS `deleteditems`;
732
DROP TABLE IF EXISTS `deleteditems`;
733
CREATE TABLE `deleteditems` (
733
CREATE TABLE `deleteditems` (
734
  `itemnumber` int(11) NOT NULL default 0,
734
  `itemnumber` int(11) NOT NULL default 0, -- primary key and unique identifier added by Koha
735
  `biblionumber` int(11) NOT NULL default 0,
735
  `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
736
  `biblioitemnumber` int(11) NOT NULL default 0,
736
  `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
737
  `barcode` varchar(20) default NULL,
737
  `barcode` varchar(20) default NULL, -- item barcode (952$p)
738
  `dateaccessioned` date default NULL,
738
  `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (952$d)
739
  `booksellerid` mediumtext default NULL,
739
  `booksellerid` mediumtext default NULL, -- where the item was purchased (952$e)
740
  `homebranch` varchar(10) default NULL,
740
  `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (952$a)
741
  `price` decimal(8,2) default NULL,
741
  `price` decimal(8,2) default NULL, -- purchase price (952$g)
742
  `replacementprice` decimal(8,2) default NULL,
742
  `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (952$v)
743
  `replacementpricedate` date default NULL,
743
  `replacementpricedate` date default NULL, -- the date the price is effective from (952$w)
744
  `datelastborrowed` date default NULL,
744
  `datelastborrowed` date default NULL, -- the date the item was last checked out
745
  `datelastseen` date default NULL,
745
  `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done)
746
  `stack` tinyint(1) default NULL,
746
  `stack` tinyint(1) default NULL,
747
  `notforloan` tinyint(1) NOT NULL default 0,
747
  `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (952$7)
748
  `damaged` tinyint(1) NOT NULL default 0,
748
  `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (952$4)
749
  `itemlost` tinyint(1) NOT NULL default 0,
749
  `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (952$1)
750
  `wthdrawn` tinyint(1) NOT NULL default 0,
750
  `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (952$0)
751
  `itemcallnumber` varchar(255) default NULL,
751
  `itemcallnumber` varchar(255) default NULL, -- call number for this item (952$o)
752
  `issues` smallint(6) default NULL,
752
  `issues` smallint(6) default NULL, -- number of times this item has been checked out
753
  `renewals` smallint(6) default NULL,
753
  `renewals` smallint(6) default NULL, -- number of times this item has been renewed
754
  `reserves` smallint(6) default NULL,
754
  `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
755
  `restricted` tinyint(1) default NULL,
755
  `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (952$5)
756
  `itemnotes` mediumtext,
756
  `itemnotes` mediumtext, -- public notes on this item (952$x)
757
  `holdingbranch` varchar(10) default NULL,
757
  `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (952$b)
758
  `paidfor` mediumtext,
758
  `paidfor` mediumtext,
759
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
759
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
760
  `location` varchar(80) default NULL,
760
  `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (952$c)
761
  `permanent_location` varchar(80) default NULL,
761
  `permanent_location` varchar(80) default NULL,
762
  `onloan` date default NULL,
762
  `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no)
763
  `cn_source` varchar(10) default NULL,
763
  `cn_source` varchar(10) default NULL, -- classification source used on this item (952$2)
764
  `cn_sort` varchar(30) default NULL,
764
  `cn_sort` varchar(30) default NULL, -- normalized form of the call number (952$o) used for sorting
765
  `ccode` varchar(10) default NULL,
765
  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (952$8)
766
  `materials` varchar(10) default NULL,
766
  `materials` varchar(10) default NULL, -- materials specified (952$3)
767
  `uri` varchar(255) default NULL,
767
  `uri` varchar(255) default NULL, -- URL for the item (952$u)
768
  `itype` varchar(10) default NULL,
768
  `itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (952$y)
769
  `more_subfields_xml` longtext default NULL,
769
  `more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format
770
  `enumchron` text default NULL,
770
  `enumchron` text default NULL, -- serial enumeration/chronology for the item (952$h)
771
  `copynumber` varchar(32) default NULL,
771
  `copynumber` varchar(32) default NULL, -- copy number (952$t)
772
  `stocknumber` varchar(32) default NULL,
772
  `stocknumber` varchar(32) default NULL,
773
  `marc` longblob,
773
  `marc` longblob, -- unused in Koha
774
  PRIMARY KEY  (`itemnumber`),
774
  PRIMARY KEY  (`itemnumber`),
775
  KEY `delitembarcodeidx` (`barcode`),
775
  KEY `delitembarcodeidx` (`barcode`),
776
  KEY `delitemstocknumberidx` (`stocknumber`),
776
  KEY `delitemstocknumberidx` (`stocknumber`),
777
- 

Return to bug 6716