|
Lines 61-67
CREATE TABLE `auth_subfield_structure` (
Link Here
|
| 61 |
`repeatable` tinyint(4) NOT NULL default 0, |
61 |
`repeatable` tinyint(4) NOT NULL default 0, |
| 62 |
`mandatory` tinyint(4) NOT NULL default 0, |
62 |
`mandatory` tinyint(4) NOT NULL default 0, |
| 63 |
`tab` tinyint(1) default NULL, |
63 |
`tab` tinyint(1) default NULL, |
| 64 |
`authorised_value` varchar(10) default NULL, |
64 |
`authorised_value` varchar(32) default NULL, |
| 65 |
`value_builder` varchar(80) default NULL, |
65 |
`value_builder` varchar(80) default NULL, |
| 66 |
`seealso` varchar(255) default NULL, |
66 |
`seealso` varchar(255) default NULL, |
| 67 |
`isurl` tinyint(1) default NULL, |
67 |
`isurl` tinyint(1) default NULL, |
|
Lines 72-78
CREATE TABLE `auth_subfield_structure` (
Link Here
|
| 72 |
`defaultvalue` TEXT, |
72 |
`defaultvalue` TEXT, |
| 73 |
PRIMARY KEY (`authtypecode`,`tagfield`,`tagsubfield`), |
73 |
PRIMARY KEY (`authtypecode`,`tagfield`,`tagsubfield`), |
| 74 |
KEY `tab` (`authtypecode`,`tab`), |
74 |
KEY `tab` (`authtypecode`,`tab`), |
| 75 |
CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE |
75 |
CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
76 |
CONSTRAINT `auth_subfield_structure_ibfk_2` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE |
| 76 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
77 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 77 |
|
78 |
|
| 78 |
-- |
79 |
-- |
|
Lines 87-95
CREATE TABLE `auth_tag_structure` (
Link Here
|
| 87 |
`libopac` varchar(255) NOT NULL default '', |
88 |
`libopac` varchar(255) NOT NULL default '', |
| 88 |
`repeatable` tinyint(4) NOT NULL default 0, |
89 |
`repeatable` tinyint(4) NOT NULL default 0, |
| 89 |
`mandatory` tinyint(4) NOT NULL default 0, |
90 |
`mandatory` tinyint(4) NOT NULL default 0, |
| 90 |
`authorised_value` varchar(10) default NULL, |
91 |
`authorised_value` varchar(32) default NULL, |
| 91 |
PRIMARY KEY (`authtypecode`,`tagfield`), |
92 |
PRIMARY KEY (`authtypecode`,`tagfield`), |
| 92 |
CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE |
93 |
CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
94 |
CONSTRAINT `auth_tag_structure_ibfk_2` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE |
| 93 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
95 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 94 |
|
96 |
|
| 95 |
|
97 |
|
|
Lines 220-226
CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field
Link Here
|
| 220 |
`category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type |
222 |
`category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type |
| 221 |
`class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type |
223 |
`class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type |
| 222 |
PRIMARY KEY (`code`), |
224 |
PRIMARY KEY (`code`), |
| 223 |
KEY `auth_val_cat_idx` (`authorised_value_category`) |
225 |
CONSTRAINT `bat_ibfk_1` FOREIGN KEY (`authorised_value_category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE |
| 224 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
226 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 225 |
|
227 |
|
| 226 |
-- |
228 |
-- |
|
Lines 676-682
CREATE TABLE `deleteditems` (
Link Here
|
| 676 |
`onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out) |
678 |
`onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out) |
| 677 |
`cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2) |
679 |
`cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2) |
| 678 |
`cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting |
680 |
`cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting |
| 679 |
`ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8) |
681 |
`ccode` varchar(80) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8) |
| 680 |
`materials` text default NULL, -- materials specified (MARC21 952$3) |
682 |
`materials` text default NULL, -- materials specified (MARC21 952$3) |
| 681 |
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u) |
683 |
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u) |
| 682 |
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y) |
684 |
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y) |
|
Lines 933-939
CREATE TABLE `items` ( -- holdings/item information
Link Here
|
| 933 |
`onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out) |
935 |
`onloan` date default NULL, -- defines if item is checked out (NULL for not checked out, and checkout date for checked out) |
| 934 |
`cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2) |
936 |
`cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2) |
| 935 |
`cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting |
937 |
`cn_sort` varchar(255) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting |
| 936 |
`ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8) |
938 |
`ccode` varchar(80) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8) |
| 937 |
`materials` text default NULL, -- materials specified (MARC21 952$3) |
939 |
`materials` text default NULL, -- materials specified (MARC21 952$3) |
| 938 |
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u) |
940 |
`uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u) |
| 939 |
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y) |
941 |
`itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y) |
|
Lines 1149-1157
CREATE TABLE `marc_tag_structure` (
Link Here
|
| 1149 |
`libopac` varchar(255) NOT NULL default '', |
1151 |
`libopac` varchar(255) NOT NULL default '', |
| 1150 |
`repeatable` tinyint(4) NOT NULL default 0, |
1152 |
`repeatable` tinyint(4) NOT NULL default 0, |
| 1151 |
`mandatory` tinyint(4) NOT NULL default 0, |
1153 |
`mandatory` tinyint(4) NOT NULL default 0, |
| 1152 |
`authorised_value` varchar(10) default NULL, |
1154 |
`authorised_value` varchar(32) default NULL, |
| 1153 |
`frameworkcode` varchar(4) NOT NULL default '', |
1155 |
`frameworkcode` varchar(4) NOT NULL default '', |
| 1154 |
PRIMARY KEY (`frameworkcode`,`tagfield`) |
1156 |
PRIMARY KEY (`frameworkcode`,`tagfield`), |
|
|
1157 |
CONSTRAINT `marc_tag_structure_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE |
| 1155 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
1158 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 1156 |
|
1159 |
|
| 1157 |
-- |
1160 |
-- |
|
Lines 1991-1997
CREATE TABLE `statistics` ( -- information related to transactions (circulation
Link Here
|
| 1991 |
`itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type |
1994 |
`itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type |
| 1992 |
`borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower |
1995 |
`borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower |
| 1993 |
`associatedborrower` int(11) default NULL, -- unused in Koha |
1996 |
`associatedborrower` int(11) default NULL, -- unused in Koha |
| 1994 |
`ccode` varchar(10) default NULL, -- foreign key from the items table, links transaction to a specific collection code |
1997 |
`ccode` varchar(80) default NULL, -- foreign key from the items table, links transaction to a specific collection code |
| 1995 |
KEY `timeidx` (`datetime`), |
1998 |
KEY `timeidx` (`datetime`), |
| 1996 |
KEY `branch_idx` (`branch`), |
1999 |
KEY `branch_idx` (`branch`), |
| 1997 |
KEY `proccode_idx` (`proccode`), |
2000 |
KEY `proccode_idx` (`proccode`), |
|
Lines 2644-2650
CREATE TABLE branch_transfer_limits (
Link Here
|
| 2644 |
toBranch varchar(10) NOT NULL, |
2647 |
toBranch varchar(10) NOT NULL, |
| 2645 |
fromBranch varchar(10) NOT NULL, |
2648 |
fromBranch varchar(10) NOT NULL, |
| 2646 |
itemtype varchar(10) NULL, |
2649 |
itemtype varchar(10) NULL, |
| 2647 |
ccode varchar(10) NULL, |
2650 |
ccode varchar(80) NULL, |
| 2648 |
PRIMARY KEY (limitId) |
2651 |
PRIMARY KEY (limitId) |
| 2649 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
2652 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 2650 |
|
2653 |
|
|
Lines 3635-3645
CREATE TABLE `additional_fields` (
Link Here
|
| 3635 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
3638 |
`id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier |
| 3636 |
`tablename` varchar(255) NOT NULL DEFAULT '', -- tablename of the new field |
3639 |
`tablename` varchar(255) NOT NULL DEFAULT '', -- tablename of the new field |
| 3637 |
`name` varchar(255) NOT NULL DEFAULT '', -- name of the field |
3640 |
`name` varchar(255) NOT NULL DEFAULT '', -- name of the field |
| 3638 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', -- is an authorised value category |
3641 |
`authorised_value_category` varchar(32) NOT NULL DEFAULT '', -- is an authorised value category |
| 3639 |
`marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record |
3642 |
`marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record |
| 3640 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable? |
3643 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable? |
| 3641 |
PRIMARY KEY (`id`), |
3644 |
PRIMARY KEY (`id`), |
| 3642 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
3645 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`), |
|
|
3646 |
CONSTRAINT `additional_fields_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE |
| 3643 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
3647 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
| 3644 |
|
3648 |
|
| 3645 |
-- |
3649 |
-- |
|
Lines 3760-3766
CREATE TABLE `course_items` (
Link Here
|
| 3760 |
`ci_id` int(11) NOT NULL AUTO_INCREMENT, -- course item id |
3764 |
`ci_id` int(11) NOT NULL AUTO_INCREMENT, -- course item id |
| 3761 |
`itemnumber` int(11) NOT NULL, -- items.itemnumber for the item on reserve |
3765 |
`itemnumber` int(11) NOT NULL, -- items.itemnumber for the item on reserve |
| 3762 |
`itype` varchar(10) DEFAULT NULL, -- new itemtype for the item to have while on reserve (optional) |
3766 |
`itype` varchar(10) DEFAULT NULL, -- new itemtype for the item to have while on reserve (optional) |
| 3763 |
`ccode` varchar(10) DEFAULT NULL, -- new category code for the item to have while on reserve (optional) |
3767 |
`ccode` varchar(80) DEFAULT NULL, -- new category code for the item to have while on reserve (optional) |
| 3764 |
`holdingbranch` varchar(10) DEFAULT NULL, -- new holding branch for the item to have while on reserve (optional) |
3768 |
`holdingbranch` varchar(10) DEFAULT NULL, -- new holding branch for the item to have while on reserve (optional) |
| 3765 |
`location` varchar(80) DEFAULT NULL, -- new shelving location for the item to have while on reseve (optional) |
3769 |
`location` varchar(80) DEFAULT NULL, -- new shelving location for the item to have while on reseve (optional) |
| 3766 |
`enabled` enum('yes','no') NOT NULL DEFAULT 'no', -- if at least one enabled course has this item on reseve, this field will be 'yes', otherwise it will be 'no' |
3770 |
`enabled` enum('yes','no') NOT NULL DEFAULT 'no', -- if at least one enabled course has this item on reseve, this field will be 'yes', otherwise it will be 'no' |
| 3767 |
- |
|
|