X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=installer%2Fdata%2Fmysql%2Fkohastructure.sql;h=d0ebda9520de34fd0e590fe0c3c90da871b41f2e;hb=a10402086b573c6b00dcb02f9ef9e83faccdbf82;hp=f8b3c71cc4012790ba5b1ed0e1b5180371f5f2e8;hpb=91b5a09c6cef398d9ad39ca1ced7d6569a87456b;p=koha_fer diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index f8b3c71cc4..d0ebda9520 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -328,11 +328,11 @@ CREATE TABLE `branch_item_rules` ( -- DROP TABLE IF EXISTS `branchcategories`; -CREATE TABLE `branchcategories` ( -- information related to library/branch groups - `categorycode` varchar(10) NOT NULL default '', -- unique key, used to identify the group - `categoryname` varchar(32), -- name used to identify the group - `codedescription` mediumtext, -- description of the group - `categorytype` varchar(16), -- defines if this is a search or properties group +CREATE TABLE `branchcategories` ( -- information related to library/branch groups + `categorycode` varchar(10) NOT NULL default '', -- unique identifier for the library/branch group + `categoryname` varchar(32), -- name of the library/branch group + `codedescription` mediumtext, -- longer description of the library/branch group + `categorytype` varchar(16), -- says whether this is a search group or a properties group PRIMARY KEY (`categorycode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -367,9 +367,9 @@ CREATE TABLE `branches` ( -- information about your libraries or branches are st -- DROP TABLE IF EXISTS `branchrelations`; -CREATE TABLE `branchrelations` ( -- tracks which libraries/branches are in each library/branch group - `branchcode` varchar(10) NOT NULL default '', -- foreign key linking to the branches table - `categorycode` varchar(10) NOT NULL default '', -- foreign key linking to the branchcategories table +CREATE TABLE `branchrelations` ( -- this table links libraries/branches to groups + `branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table to identify the branch + `categorycode` varchar(10) NOT NULL default '', -- foreign key from the branchcategories table to identify the group PRIMARY KEY (`branchcode`,`categorycode`), KEY `branchcode` (`branchcode`), KEY `categorycode` (`categorycode`), @@ -1051,13 +1051,13 @@ CREATE TABLE `items` ( -- DROP TABLE IF EXISTS `itemtypes`; -CREATE TABLE `itemtypes` ( - `itemtype` varchar(10) NOT NULL default '', - `description` mediumtext, - `rentalcharge` double(16,4) default NULL, - `notforloan` smallint(6) default NULL, - `imageurl` varchar(200) default NULL, - `summary` text, +CREATE TABLE `itemtypes` ( -- defines the item types + `itemtype` varchar(10) NOT NULL default '', -- unique key, a code associated with the item type + `description` mediumtext, -- a plain text explanation of the item type + `rentalcharge` double(16,4) default NULL, -- the amount charged when this item is checked out/issued + `notforloan` smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan + `imageurl` varchar(200) default NULL, -- URL for the item type icon + `summary` text, -- information from the summary field, may include HTML PRIMARY KEY (`itemtype`), UNIQUE KEY `itemtype` (`itemtype`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -1700,17 +1700,17 @@ CREATE TABLE `special_holidays` ( -- DROP TABLE IF EXISTS `statistics`; -CREATE TABLE `statistics` ( - `datetime` datetime default NULL, - `branch` varchar(10) default NULL, - `proccode` varchar(4) default NULL, - `value` double(16,4) default NULL, - `type` varchar(16) default NULL, +CREATE TABLE `statistics` ( -- information related to transactions (circulation and fines) in Koha + `datetime` datetime default NULL, -- date and time of the transaction + `branch` varchar(10) default NULL, -- foreign key, branch where the transaction occurred + `proccode` varchar(4) default NULL, -- proceedure code + `value` double(16,4) default NULL, -- monetary value associated with the transaction + `type` varchar(16) default NULL, -- transaction type (locause, issue, return, renew, writeoff, payment, Credit*) `other` mediumtext, `usercode` varchar(10) default NULL, - `itemnumber` int(11) default NULL, - `itemtype` varchar(10) default NULL, - `borrowernumber` int(11) default NULL, + `itemnumber` int(11) default NULL, -- foreign key from the items table, links transaction to a specific item + `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type + `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower `associatedborrower` int(11) default NULL, KEY `timeidx` (`datetime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;