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

(-)a/installer/data/mysql/kohastructure.sql (-165 / +165 lines)
Lines 32-38 CREATE TABLE `auth_header` ( Link Here
32
  `marcxml` longtext NOT NULL,
32
  `marcxml` longtext NOT NULL,
33
  PRIMARY KEY  (`authid`),
33
  PRIMARY KEY  (`authid`),
34
  KEY `origincode` (`origincode`)
34
  KEY `origincode` (`origincode`)
35
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
36
36
37
--
37
--
38
-- Table structure for table `auth_subfield_structure`
38
-- Table structure for table `auth_subfield_structure`
Lines 59-65 CREATE TABLE `auth_subfield_structure` ( Link Here
59
  `defaultvalue` TEXT DEFAULT '',
59
  `defaultvalue` TEXT DEFAULT '',
60
  PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
60
  PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
61
  KEY `tab` (`authtypecode`,`tab`)
61
  KEY `tab` (`authtypecode`,`tab`)
62
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
62
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
63
63
64
--
64
--
65
-- Table structure for table `auth_tag_structure`
65
-- Table structure for table `auth_tag_structure`
Lines 76-82 CREATE TABLE `auth_tag_structure` ( Link Here
76
  `authorised_value` varchar(10) default NULL,
76
  `authorised_value` varchar(10) default NULL,
77
  PRIMARY KEY  (`authtypecode`,`tagfield`),
77
  PRIMARY KEY  (`authtypecode`,`tagfield`),
78
  CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
78
  CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
79
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
79
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
80
80
81
--
81
--
82
-- Table structure for table `auth_types`
82
-- Table structure for table `auth_types`
Lines 89-95 CREATE TABLE `auth_types` ( Link Here
89
  `auth_tag_to_report` varchar(3) NOT NULL default '',
89
  `auth_tag_to_report` varchar(3) NOT NULL default '',
90
  `summary` mediumtext NOT NULL,
90
  `summary` mediumtext NOT NULL,
91
  PRIMARY KEY  (`authtypecode`)
91
  PRIMARY KEY  (`authtypecode`)
92
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
92
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
93
93
94
--
94
--
95
-- Table structure for table `authorised_values`
95
-- Table structure for table `authorised_values`
Lines 107-113 CREATE TABLE `authorised_values` ( -- stores values for authorized values catego Link Here
107
  KEY `name` (`category`),
107
  KEY `name` (`category`),
108
  KEY `lib` (`lib`),
108
  KEY `lib` (`lib`),
109
  KEY `auth_value_idx` (`authorised_value`)
109
  KEY `auth_value_idx` (`authorised_value`)
110
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
110
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
111
111
112
--
112
--
113
-- Table structure for table `biblio`
113
-- Table structure for table `biblio`
Lines 129-135 CREATE TABLE `biblio` ( -- table that stores bibliographic information Link Here
129
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
129
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
130
  PRIMARY KEY  (`biblionumber`),
130
  PRIMARY KEY  (`biblionumber`),
131
  KEY `blbnoidx` (`biblionumber`)
131
  KEY `blbnoidx` (`biblionumber`)
132
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
132
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
133
133
134
--
134
--
135
-- Table structure for table `biblio_framework`
135
-- Table structure for table `biblio_framework`
Lines 140-146 CREATE TABLE `biblio_framework` ( -- information about MARC frameworks Link Here
140
  `frameworkcode` varchar(4) NOT NULL default '', -- the unique code assigned to the framework
140
  `frameworkcode` varchar(4) NOT NULL default '', -- the unique code assigned to the framework
141
  `frameworktext` varchar(255) NOT NULL default '', -- the description/name given to the framework
141
  `frameworktext` varchar(255) NOT NULL default '', -- the description/name given to the framework
142
  PRIMARY KEY  (`frameworkcode`)
142
  PRIMARY KEY  (`frameworkcode`)
143
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
143
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
144
144
145
--
145
--
146
-- Table structure for table `biblioitems`
146
-- Table structure for table `biblioitems`
Lines 190-196 CREATE TABLE `biblioitems` ( -- information related to bibliographic records in Link Here
190
  KEY `issn` (`issn`(255)),
190
  KEY `issn` (`issn`(255)),
191
  KEY `publishercode` (`publishercode`),
191
  KEY `publishercode` (`publishercode`),
192
  CONSTRAINT `biblioitems_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
192
  CONSTRAINT `biblioitems_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
193
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
193
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
194
194
195
--
195
--
196
-- Table structure for table `borrowers`
196
-- Table structure for table `borrowers`
Lines 276-282 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
276
  KEY `othernames_idx` (`othernames`(255)),
276
  KEY `othernames_idx` (`othernames`(255)),
277
  CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
277
  CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
278
  CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
278
  CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
279
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
279
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
280
280
281
--
281
--
282
-- Table structure for table `borrower_attribute_types`
282
-- Table structure for table `borrower_attribute_types`
Lines 297-303 CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field Link Here
297
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
297
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
298
  PRIMARY KEY  (`code`),
298
  PRIMARY KEY  (`code`),
299
  KEY `auth_val_cat_idx` (`authorised_value_category`)
299
  KEY `auth_val_cat_idx` (`authorised_value_category`)
300
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
300
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
301
301
302
--
302
--
303
-- Table structure for table `borrower_attributes`
303
-- Table structure for table `borrower_attributes`
Lines 315-321 CREATE TABLE `borrower_attributes` ( -- values of custom patron fields known as Link Here
315
    ON DELETE CASCADE ON UPDATE CASCADE,
315
    ON DELETE CASCADE ON UPDATE CASCADE,
316
  CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`)
316
  CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`)
317
    ON DELETE CASCADE ON UPDATE CASCADE
317
    ON DELETE CASCADE ON UPDATE CASCADE
318
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
318
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
319
319
320
--
320
--
321
-- Table structure for table `borrower_debarments`
321
-- Table structure for table `borrower_debarments`
Lines 335-341 CREATE TABLE borrower_debarments ( Link Here
335
  KEY borrowernumber (borrowernumber),
335
  KEY borrowernumber (borrowernumber),
336
  CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
336
  CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
337
    ON DELETE CASCADE ON UPDATE CASCADE
337
    ON DELETE CASCADE ON UPDATE CASCADE
338
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
338
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
339
339
340
340
341
--
341
--
Lines 354-360 CREATE TABLE `branch_item_rules` ( -- information entered in the circulation and Link Here
354
    ON DELETE CASCADE ON UPDATE CASCADE,
354
    ON DELETE CASCADE ON UPDATE CASCADE,
355
  CONSTRAINT `branch_item_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
355
  CONSTRAINT `branch_item_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
356
    ON DELETE CASCADE ON UPDATE CASCADE
356
    ON DELETE CASCADE ON UPDATE CASCADE
357
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
357
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
358
358
359
--
359
--
360
-- Table structure for table borrower_sync
360
-- Table structure for table borrower_sync
Lines 387-393 CREATE TABLE `branchcategories` ( -- information related to library/branch group Link Here
387
  `show_in_pulldown` tinyint(1) NOT NULL DEFAULT '0', -- says this group should be in the opac libararies pulldown if it is enabled
387
  `show_in_pulldown` tinyint(1) NOT NULL DEFAULT '0', -- says this group should be in the opac libararies pulldown if it is enabled
388
  PRIMARY KEY  (`categorycode`),
388
  PRIMARY KEY  (`categorycode`),
389
  KEY `show_in_pulldown` (`show_in_pulldown`)
389
  KEY `show_in_pulldown` (`show_in_pulldown`)
390
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
390
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
391
391
392
--
392
--
393
-- Table structure for table `branches`
393
-- Table structure for table `branches`
Lines 416-422 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
416
  `branchnotes` mediumtext, -- notes related to your library or branch
416
  `branchnotes` mediumtext, -- notes related to your library or branch
417
  opac_info text, -- HTML that displays in OPAC
417
  opac_info text, -- HTML that displays in OPAC
418
  PRIMARY KEY (`branchcode`)
418
  PRIMARY KEY (`branchcode`)
419
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
419
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
420
420
421
--
421
--
422
-- Table structure for table `branchrelations`
422
-- Table structure for table `branchrelations`
Lines 431-437 CREATE TABLE `branchrelations` ( -- this table links libraries/branches to group Link Here
431
  KEY `categorycode` (`categorycode`),
431
  KEY `categorycode` (`categorycode`),
432
  CONSTRAINT `branchrelations_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
432
  CONSTRAINT `branchrelations_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
433
  CONSTRAINT `branchrelations_ibfk_2` FOREIGN KEY (`categorycode`) REFERENCES `branchcategories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
433
  CONSTRAINT `branchrelations_ibfk_2` FOREIGN KEY (`categorycode`) REFERENCES `branchcategories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
434
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
434
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
435
435
436
--
436
--
437
-- Table structure for table `branchtransfers`
437
-- Table structure for table `branchtransfers`
Lines 451-457 CREATE TABLE `branchtransfers` ( -- information for items that are in transit be Link Here
451
  CONSTRAINT `branchtransfers_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
451
  CONSTRAINT `branchtransfers_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
452
  CONSTRAINT `branchtransfers_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
452
  CONSTRAINT `branchtransfers_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
453
  CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
453
  CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
454
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
454
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
455
455
456
456
457
--
457
--
Lines 464-470 CREATE TABLE `browser` ( Link Here
464
  `description` varchar(255) NOT NULL,
464
  `description` varchar(255) NOT NULL,
465
  `number` bigint(20) NOT NULL,
465
  `number` bigint(20) NOT NULL,
466
  `endnode` tinyint(4) NOT NULL
466
  `endnode` tinyint(4) NOT NULL
467
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
467
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
468
468
469
--
469
--
470
-- Table structure for table `categories`
470
-- Table structure for table `categories`
Lines 490-496 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
490
  `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category
490
  `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category
491
  PRIMARY KEY  (`categorycode`),
491
  PRIMARY KEY  (`categorycode`),
492
  UNIQUE KEY `categorycode` (`categorycode`)
492
  UNIQUE KEY `categorycode` (`categorycode`)
493
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
493
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
494
494
495
--
495
--
496
-- Table: collections
496
-- Table: collections
Lines 542-548 CREATE TABLE `courses` ( Link Here
542
  `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', -- Determines whether the course is active
542
  `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', -- Determines whether the course is active
543
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
543
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
544
   PRIMARY KEY (`course_id`)
544
   PRIMARY KEY (`course_id`)
545
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
545
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
546
546
547
--
547
--
548
-- Table structure for table `course_instructors`
548
-- Table structure for table `course_instructors`
Lines 558-564 CREATE TABLE `course_instructors` ( Link Here
558
  `borrowernumber` int(11) NOT NULL,
558
  `borrowernumber` int(11) NOT NULL,
559
  PRIMARY KEY (`course_id`,`borrowernumber`),
559
  PRIMARY KEY (`course_id`,`borrowernumber`),
560
  KEY `borrowernumber` (`borrowernumber`)
560
  KEY `borrowernumber` (`borrowernumber`)
561
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
561
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
562
562
563
--
563
--
564
-- Constraints for table `course_instructors`
564
-- Constraints for table `course_instructors`
Lines 588-594 CREATE TABLE `course_items` ( Link Here
588
   PRIMARY KEY (`ci_id`),
588
   PRIMARY KEY (`ci_id`),
589
   UNIQUE KEY `itemnumber` (`itemnumber`),
589
   UNIQUE KEY `itemnumber` (`itemnumber`),
590
   KEY `holdingbranch` (`holdingbranch`)
590
   KEY `holdingbranch` (`holdingbranch`)
591
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
591
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
592
592
593
--
593
--
594
-- Constraints for table `course_items`
594
-- Constraints for table `course_items`
Lines 615-621 CREATE TABLE `course_reserves` ( Link Here
615
   PRIMARY KEY (`cr_id`),
615
   PRIMARY KEY (`cr_id`),
616
   UNIQUE KEY `pseudo_key` (`course_id`,`ci_id`),
616
   UNIQUE KEY `pseudo_key` (`course_id`,`ci_id`),
617
   KEY `course_id` (`course_id`)
617
   KEY `course_id` (`course_id`)
618
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
618
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
619
619
620
--
620
--
621
-- Constraints for table `course_reserves`
621
-- Constraints for table `course_reserves`
Lines 637-643 CREATE TABLE `branch_borrower_circ_rules` ( -- includes default circulation rule Link Here
637
    ON DELETE CASCADE ON UPDATE CASCADE,
637
    ON DELETE CASCADE ON UPDATE CASCADE,
638
  CONSTRAINT `branch_borrower_circ_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
638
  CONSTRAINT `branch_borrower_circ_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
639
    ON DELETE CASCADE ON UPDATE CASCADE
639
    ON DELETE CASCADE ON UPDATE CASCADE
640
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
640
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
641
641
642
--
642
--
643
-- Table structure for table `default_borrower_circ_rules`
643
-- Table structure for table `default_borrower_circ_rules`
Lines 650-656 CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found und Link Here
650
  PRIMARY KEY (`categorycode`),
650
  PRIMARY KEY (`categorycode`),
651
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
651
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
652
    ON DELETE CASCADE ON UPDATE CASCADE
652
    ON DELETE CASCADE ON UPDATE CASCADE
653
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
653
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
654
654
655
--
655
--
656
-- Table structure for table `default_branch_circ_rules`
656
-- Table structure for table `default_branch_circ_rules`
Lines 665-671 CREATE TABLE `default_branch_circ_rules` ( Link Here
665
  PRIMARY KEY (`branchcode`),
665
  PRIMARY KEY (`branchcode`),
666
  CONSTRAINT `default_branch_circ_rules_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
666
  CONSTRAINT `default_branch_circ_rules_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
667
    ON DELETE CASCADE ON UPDATE CASCADE
667
    ON DELETE CASCADE ON UPDATE CASCADE
668
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
668
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
669
669
670
--
670
--
671
-- Table structure for table `default_branch_item_rules`
671
-- Table structure for table `default_branch_item_rules`
Lines 678-684 CREATE TABLE `default_branch_item_rules` ( Link Here
678
  PRIMARY KEY  (`itemtype`),
678
  PRIMARY KEY  (`itemtype`),
679
  CONSTRAINT `default_branch_item_rules_ibfk_1` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
679
  CONSTRAINT `default_branch_item_rules_ibfk_1` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
680
    ON DELETE CASCADE ON UPDATE CASCADE
680
    ON DELETE CASCADE ON UPDATE CASCADE
681
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
681
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
682
682
683
--
683
--
684
-- Table structure for table `default_circ_rules`
684
-- Table structure for table `default_circ_rules`
Lines 691-697 CREATE TABLE `default_circ_rules` ( Link Here
691
    `holdallowed` int(1) default NULL,
691
    `holdallowed` int(1) default NULL,
692
    `returnbranch` varchar(15) default NULL,
692
    `returnbranch` varchar(15) default NULL,
693
    PRIMARY KEY (`singleton`)
693
    PRIMARY KEY (`singleton`)
694
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
694
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
695
695
696
--
696
--
697
-- Table structure for table `cities`
697
-- Table structure for table `cities`
Lines 705-711 CREATE TABLE `cities` ( -- authorized values for cities/states/countries to choo Link Here
705
  `city_country` VARCHAR( 100 ) NULL DEFAULT NULL, -- name of the country
705
  `city_country` VARCHAR( 100 ) NULL DEFAULT NULL, -- name of the country
706
  `city_zipcode` varchar(20) default NULL, -- zip or postal code
706
  `city_zipcode` varchar(20) default NULL, -- zip or postal code
707
  PRIMARY KEY  (`cityid`)
707
  PRIMARY KEY  (`cityid`)
708
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
708
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
709
709
710
--
710
--
711
-- Table structure for table `class_sort_rules`
711
-- Table structure for table `class_sort_rules`
Lines 718-724 CREATE TABLE `class_sort_rules` ( Link Here
718
  `sort_routine` varchar(30) NOT NULL default '',
718
  `sort_routine` varchar(30) NOT NULL default '',
719
  PRIMARY KEY (`class_sort_rule`),
719
  PRIMARY KEY (`class_sort_rule`),
720
  UNIQUE KEY `class_sort_rule_idx` (`class_sort_rule`)
720
  UNIQUE KEY `class_sort_rule_idx` (`class_sort_rule`)
721
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
721
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
722
722
723
--
723
--
724
-- Table structure for table `class_sources`
724
-- Table structure for table `class_sources`
Lines 734-740 CREATE TABLE `class_sources` ( Link Here
734
  UNIQUE KEY `cn_source_idx` (`cn_source`),
734
  UNIQUE KEY `cn_source_idx` (`cn_source`),
735
  KEY `used_idx` (`used`),
735
  KEY `used_idx` (`used`),
736
  CONSTRAINT `class_source_ibfk_1` FOREIGN KEY (`class_sort_rule`) REFERENCES `class_sort_rules` (`class_sort_rule`)
736
  CONSTRAINT `class_source_ibfk_1` FOREIGN KEY (`class_sort_rule`) REFERENCES `class_sort_rules` (`class_sort_rule`)
737
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
737
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
738
738
739
--
739
--
740
-- Table structure for table `currency`
740
-- Table structure for table `currency`
Lines 749-755 CREATE TABLE `currency` ( Link Here
749
  `rate` float(15,5) default NULL,
749
  `rate` float(15,5) default NULL,
750
  `active` tinyint(1) default NULL,
750
  `active` tinyint(1) default NULL,
751
  PRIMARY KEY  (`currency`)
751
  PRIMARY KEY  (`currency`)
752
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
752
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
753
753
754
--
754
--
755
-- Table structure for table `deletedbiblio`
755
-- Table structure for table `deletedbiblio`
Lines 771-777 CREATE TABLE `deletedbiblio` ( -- stores information about bibliographic records Link Here
771
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
771
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
772
  PRIMARY KEY  (`biblionumber`),
772
  PRIMARY KEY  (`biblionumber`),
773
  KEY `blbnoidx` (`biblionumber`)
773
  KEY `blbnoidx` (`biblionumber`)
774
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
774
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
775
775
776
--
776
--
777
-- Table structure for table `deletedbiblioitems`
777
-- Table structure for table `deletedbiblioitems`
Lines 819-825 CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t Link Here
819
  KEY `itemtype_idx` (`itemtype`),
819
  KEY `itemtype_idx` (`itemtype`),
820
  KEY `isbn` (`isbn`(255)),
820
  KEY `isbn` (`isbn`(255)),
821
  KEY `publishercode` (`publishercode`)
821
  KEY `publishercode` (`publishercode`)
822
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
822
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
823
823
824
--
824
--
825
-- Table structure for table `deletedborrowers`
825
-- Table structure for table `deletedborrowers`
Lines 896-902 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
896
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
896
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
897
  KEY borrowernumber (borrowernumber),
897
  KEY borrowernumber (borrowernumber),
898
  KEY `cardnumber` (`cardnumber`)
898
  KEY `cardnumber` (`cardnumber`)
899
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
899
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
900
900
901
--
901
--
902
-- Table structure for table `deleteditems`
902
-- Table structure for table `deleteditems`
Lines 954-960 CREATE TABLE `deleteditems` ( Link Here
954
  KEY `delhomebranch` (`homebranch`),
954
  KEY `delhomebranch` (`homebranch`),
955
  KEY `delholdingbranch` (`holdingbranch`),
955
  KEY `delholdingbranch` (`holdingbranch`),
956
  KEY `itype_idx` (`itype`)
956
  KEY `itype_idx` (`itype`)
957
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
957
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
958
958
959
--
959
--
960
-- Table structure for table `ethnicity`
960
-- Table structure for table `ethnicity`
Lines 965-971 CREATE TABLE `ethnicity` ( Link Here
965
  `code` varchar(10) NOT NULL default '',
965
  `code` varchar(10) NOT NULL default '',
966
  `name` varchar(255) default NULL,
966
  `name` varchar(255) default NULL,
967
  PRIMARY KEY  (`code`)
967
  PRIMARY KEY  (`code`)
968
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
968
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
969
969
970
--
970
--
971
-- Table structure for table `export_format`
971
-- Table structure for table `export_format`
Lines 1007-1013 CREATE TABLE hold_fill_targets ( Link Here
1007
    REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1007
    REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1008
  CONSTRAINT `hold_fill_targets_ibfk_4` FOREIGN KEY (`source_branchcode`)
1008
  CONSTRAINT `hold_fill_targets_ibfk_4` FOREIGN KEY (`source_branchcode`)
1009
    REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
1009
    REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
1010
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1010
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1011
1011
1012
--
1012
--
1013
-- Table structure for table `import_batches`
1013
-- Table structure for table `import_batches`
Lines 1032-1038 CREATE TABLE `import_batches` ( -- information about batches of marc records tha Link Here
1032
  `comments` mediumtext, -- any comments added when the file was uploaded
1032
  `comments` mediumtext, -- any comments added when the file was uploaded
1033
  PRIMARY KEY (`import_batch_id`),
1033
  PRIMARY KEY (`import_batch_id`),
1034
  KEY `branchcode` (`branchcode`)
1034
  KEY `branchcode` (`branchcode`)
1035
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1035
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1036
1036
1037
--
1037
--
1038
-- Table structure for table `import_records`
1038
-- Table structure for table `import_records`
Lines 1061-1067 CREATE TABLE `import_records` ( Link Here
1061
  KEY `branchcode` (`branchcode`),
1061
  KEY `branchcode` (`branchcode`),
1062
  KEY `batch_sequence` (`import_batch_id`, `record_sequence`),
1062
  KEY `batch_sequence` (`import_batch_id`, `record_sequence`),
1063
  KEY `batch_id_record_type` (`import_batch_id`,`record_type`)
1063
  KEY `batch_id_record_type` (`import_batch_id`,`record_type`)
1064
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1064
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1065
1065
1066
--
1066
--
1067
-- Table structure for `import_record_matches`
1067
-- Table structure for `import_record_matches`
Lines 1074-1080 CREATE TABLE `import_record_matches` ( -- matches found when importing a batch o Link Here
1074
  CONSTRAINT `import_record_matches_ibfk_1` FOREIGN KEY (`import_record_id`)
1074
  CONSTRAINT `import_record_matches_ibfk_1` FOREIGN KEY (`import_record_id`)
1075
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1075
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1076
  KEY `record_score` (`import_record_id`, `score`)
1076
  KEY `record_score` (`import_record_id`, `score`)
1077
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1077
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1078
1078
1079
--
1079
--
1080
-- Table structure for table `import_auths`
1080
-- Table structure for table `import_auths`
Lines 1090-1096 CREATE TABLE `import_auths` ( Link Here
1090
  CONSTRAINT `import_auths_ibfk_1` FOREIGN KEY (`import_record_id`)
1090
  CONSTRAINT `import_auths_ibfk_1` FOREIGN KEY (`import_record_id`)
1091
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1091
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1092
  KEY `matched_authid` (`matched_authid`)
1092
  KEY `matched_authid` (`matched_authid`)
1093
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1093
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1094
1094
1095
--
1095
--
1096
-- Table structure for table `import_biblios`
1096
-- Table structure for table `import_biblios`
Lines 1112-1118 CREATE TABLE `import_biblios` ( Link Here
1112
  KEY `matched_biblionumber` (`matched_biblionumber`),
1112
  KEY `matched_biblionumber` (`matched_biblionumber`),
1113
  KEY `title` (`title`),
1113
  KEY `title` (`title`),
1114
  KEY `isbn` (`isbn`)
1114
  KEY `isbn` (`isbn`)
1115
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1115
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1116
1116
1117
--
1117
--
1118
-- Table structure for table `import_items`
1118
-- Table structure for table `import_items`
Lines 1132-1138 CREATE TABLE `import_items` ( Link Here
1132
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1132
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1133
  KEY `itemnumber` (`itemnumber`),
1133
  KEY `itemnumber` (`itemnumber`),
1134
  KEY `branchcode` (`branchcode`)
1134
  KEY `branchcode` (`branchcode`)
1135
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1135
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1136
1136
1137
--
1137
--
1138
-- Table structure for table `issues`
1138
-- Table structure for table `issues`
Lines 1160-1166 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1160
  KEY `bordate` (`borrowernumber`,`timestamp`),
1160
  KEY `bordate` (`borrowernumber`,`timestamp`),
1161
  CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE,
1161
  CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE,
1162
  CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE
1162
  CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE
1163
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1163
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1164
1164
1165
--
1165
--
1166
-- Table structure for table `issuingrules`
1166
-- Table structure for table `issuingrules`
Lines 1195-1201 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1195
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
1195
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
1196
  KEY `categorycode` (`categorycode`),
1196
  KEY `categorycode` (`categorycode`),
1197
  KEY `itemtype` (`itemtype`)
1197
  KEY `itemtype` (`itemtype`)
1198
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1198
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1199
1199
1200
--
1200
--
1201
-- Table structure for table `items`
1201
-- Table structure for table `items`
Lines 1259-1265 CREATE TABLE `items` ( -- holdings/item information Link Here
1259
  CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1259
  CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1260
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
1260
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
1261
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE
1261
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE
1262
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1262
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1263
1263
1264
--
1264
--
1265
-- Table structure for table `itemtypes`
1265
-- Table structure for table `itemtypes`
Lines 1278-1284 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
1278
  sip_media_type VARCHAR(3) DEFAULT NULL, -- SIP2 protocol media type for this itemtype
1278
  sip_media_type VARCHAR(3) DEFAULT NULL, -- SIP2 protocol media type for this itemtype
1279
  PRIMARY KEY  (`itemtype`),
1279
  PRIMARY KEY  (`itemtype`),
1280
  UNIQUE KEY `itemtype` (`itemtype`)
1280
  UNIQUE KEY `itemtype` (`itemtype`)
1281
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1281
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1282
1282
1283
--
1283
--
1284
-- Table structure for table `creator_batches`
1284
-- Table structure for table `creator_batches`
Lines 1302-1308 CREATE TABLE `creator_batches` ( Link Here
1302
  CONSTRAINT `creator_batches_ibfk_1` FOREIGN KEY (`borrower_number`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1302
  CONSTRAINT `creator_batches_ibfk_1` FOREIGN KEY (`borrower_number`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1303
  CONSTRAINT `creator_batches_ibfk_2` FOREIGN KEY (`branch_code`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE,
1303
  CONSTRAINT `creator_batches_ibfk_2` FOREIGN KEY (`branch_code`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE,
1304
  CONSTRAINT `creator_batches_ibfk_3` FOREIGN KEY (`item_number`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE
1304
  CONSTRAINT `creator_batches_ibfk_3` FOREIGN KEY (`item_number`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE
1305
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1305
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1306
1306
1307
--
1307
--
1308
-- Table structure for table `creator_images`
1308
-- Table structure for table `creator_images`
Lines 1317-1323 CREATE TABLE `creator_images` ( Link Here
1317
  `image_name` char(20) NOT NULL DEFAULT 'DEFAULT',
1317
  `image_name` char(20) NOT NULL DEFAULT 'DEFAULT',
1318
  PRIMARY KEY (`image_id`),
1318
  PRIMARY KEY (`image_id`),
1319
  UNIQUE KEY `image_name_index` (`image_name`)
1319
  UNIQUE KEY `image_name_index` (`image_name`)
1320
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1320
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1321
1321
1322
--
1322
--
1323
-- Table structure for table `creator_layouts`
1323
-- Table structure for table `creator_layouts`
Lines 1342-1348 CREATE TABLE `creator_layouts` ( Link Here
1342
  `layout_xml` text NOT NULL,
1342
  `layout_xml` text NOT NULL,
1343
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1343
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1344
  PRIMARY KEY (`layout_id`)
1344
  PRIMARY KEY (`layout_id`)
1345
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1345
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1346
1346
1347
--
1347
--
1348
-- Table structure for table `creator_templates`
1348
-- Table structure for table `creator_templates`
Lines 1372-1378 CREATE TABLE `creator_templates` ( Link Here
1372
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1372
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1373
  PRIMARY KEY (`template_id`),
1373
  PRIMARY KEY (`template_id`),
1374
  KEY `template_profile_fk_constraint` (`profile_id`)
1374
  KEY `template_profile_fk_constraint` (`profile_id`)
1375
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1375
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1376
1376
1377
--
1377
--
1378
-- Table structure for table `letter`
1378
-- Table structure for table `letter`
Lines 1391-1397 CREATE TABLE `letter` ( -- table for all notice templates in Koha Link Here
1391
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
1391
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`),
1392
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
1392
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
1393
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
1393
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
1394
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1394
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1395
1395
1396
--
1396
--
1397
-- Table structure for table `marc_subfield_structure`
1397
-- Table structure for table `marc_subfield_structure`
Lines 1421-1427 CREATE TABLE `marc_subfield_structure` ( Link Here
1421
  KEY `kohafield_2` (`kohafield`),
1421
  KEY `kohafield_2` (`kohafield`),
1422
  KEY `tab` (`frameworkcode`,`tab`),
1422
  KEY `tab` (`frameworkcode`,`tab`),
1423
  KEY `kohafield` (`frameworkcode`,`kohafield`)
1423
  KEY `kohafield` (`frameworkcode`,`kohafield`)
1424
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1424
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1425
1425
1426
--
1426
--
1427
-- Table structure for table `marc_tag_structure`
1427
-- Table structure for table `marc_tag_structure`
Lines 1437-1443 CREATE TABLE `marc_tag_structure` ( Link Here
1437
  `authorised_value` varchar(10) default NULL,
1437
  `authorised_value` varchar(10) default NULL,
1438
  `frameworkcode` varchar(4) NOT NULL default '',
1438
  `frameworkcode` varchar(4) NOT NULL default '',
1439
  PRIMARY KEY  (`frameworkcode`,`tagfield`)
1439
  PRIMARY KEY  (`frameworkcode`,`tagfield`)
1440
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1440
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1441
1441
1442
--
1442
--
1443
-- Table structure for table `marc_matchers`
1443
-- Table structure for table `marc_matchers`
Lines 1453-1459 CREATE TABLE `marc_matchers` ( Link Here
1453
  PRIMARY KEY (`matcher_id`),
1453
  PRIMARY KEY (`matcher_id`),
1454
  KEY `code` (`code`),
1454
  KEY `code` (`code`),
1455
  KEY `record_type` (`record_type`)
1455
  KEY `record_type` (`record_type`)
1456
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1456
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1457
1457
1458
--
1458
--
1459
-- Table structure for table `matchpoints`
1459
-- Table structure for table `matchpoints`
Lines 1467-1473 CREATE TABLE `matchpoints` ( Link Here
1467
  PRIMARY KEY (`matchpoint_id`),
1467
  PRIMARY KEY (`matchpoint_id`),
1468
  CONSTRAINT `matchpoints_ifbk_1` FOREIGN KEY (`matcher_id`)
1468
  CONSTRAINT `matchpoints_ifbk_1` FOREIGN KEY (`matcher_id`)
1469
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE
1469
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE
1470
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1470
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1471
1471
1472
1472
1473
--
1473
--
Lines 1486-1492 CREATE TABLE `matchpoint_components` ( Link Here
1486
  KEY `by_sequence` (`matchpoint_id`, `sequence`),
1486
  KEY `by_sequence` (`matchpoint_id`, `sequence`),
1487
  CONSTRAINT `matchpoint_components_ifbk_1` FOREIGN KEY (`matchpoint_id`)
1487
  CONSTRAINT `matchpoint_components_ifbk_1` FOREIGN KEY (`matchpoint_id`)
1488
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1488
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1489
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1489
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1490
1490
1491
--
1491
--
1492
-- Table structure for table `matcher_component_norms`
1492
-- Table structure for table `matcher_component_norms`
Lines 1499-1505 CREATE TABLE `matchpoint_component_norms` ( Link Here
1499
  KEY `matchpoint_component_norms` (`matchpoint_component_id`, `sequence`),
1499
  KEY `matchpoint_component_norms` (`matchpoint_component_id`, `sequence`),
1500
  CONSTRAINT `matchpoint_component_norms_ifbk_1` FOREIGN KEY (`matchpoint_component_id`)
1500
  CONSTRAINT `matchpoint_component_norms_ifbk_1` FOREIGN KEY (`matchpoint_component_id`)
1501
  REFERENCES `matchpoint_components` (`matchpoint_component_id`) ON DELETE CASCADE ON UPDATE CASCADE
1501
  REFERENCES `matchpoint_components` (`matchpoint_component_id`) ON DELETE CASCADE ON UPDATE CASCADE
1502
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1502
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1503
1503
1504
--
1504
--
1505
-- Table structure for table `matcher_matchpoints`
1505
-- Table structure for table `matcher_matchpoints`
Lines 1512-1518 CREATE TABLE `matcher_matchpoints` ( Link Here
1512
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1512
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1513
  CONSTRAINT `matcher_matchpoints_ifbk_2` FOREIGN KEY (`matchpoint_id`)
1513
  CONSTRAINT `matcher_matchpoints_ifbk_2` FOREIGN KEY (`matchpoint_id`)
1514
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1514
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1515
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1515
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1516
1516
1517
--
1517
--
1518
-- Table structure for table `matchchecks`
1518
-- Table structure for table `matchchecks`
Lines 1530-1536 CREATE TABLE `matchchecks` ( Link Here
1530
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1530
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1531
  CONSTRAINT `matcher_matchchecks_ifbk_3` FOREIGN KEY (`target_matchpoint_id`)
1531
  CONSTRAINT `matcher_matchchecks_ifbk_3` FOREIGN KEY (`target_matchpoint_id`)
1532
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1532
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1533
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1533
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1534
1534
1535
--
1535
--
1536
-- Table structure for table `need_merge_authorities`
1536
-- Table structure for table `need_merge_authorities`
Lines 1541-1547 CREATE TABLE `need_merge_authorities` ( -- keeping track of authority records st Link Here
1541
  `id` int NOT NULL auto_increment PRIMARY KEY, -- unique id
1541
  `id` int NOT NULL auto_increment PRIMARY KEY, -- unique id
1542
  `authid` bigint NOT NULL, -- reference to authority record
1542
  `authid` bigint NOT NULL, -- reference to authority record
1543
  `done` tinyint DEFAULT 0  -- indication whether merge has been executed (0=not done, 1= done, 2= in progress)
1543
  `done` tinyint DEFAULT 0  -- indication whether merge has been executed (0=not done, 1= done, 2= in progress)
1544
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1544
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1545
1545
1546
--
1546
--
1547
-- Table structure for table `notifys`
1547
-- Table structure for table `notifys`
Lines 1556-1562 CREATE TABLE `notifys` ( Link Here
1556
  `notify_send_date` date default NULL,
1556
  `notify_send_date` date default NULL,
1557
  `notify_level` int(1) NOT NULL default 0,
1557
  `notify_level` int(1) NOT NULL default 0,
1558
  `method` varchar(20) NOT NULL default ''
1558
  `method` varchar(20) NOT NULL default ''
1559
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1559
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1560
1560
1561
--
1561
--
1562
-- Table structure for table `oai_sets`
1562
-- Table structure for table `oai_sets`
Lines 1568-1574 CREATE TABLE `oai_sets` ( Link Here
1568
  `spec` varchar(80) NOT NULL UNIQUE,
1568
  `spec` varchar(80) NOT NULL UNIQUE,
1569
  `name` varchar(80) NOT NULL,
1569
  `name` varchar(80) NOT NULL,
1570
  PRIMARY KEY (`id`)
1570
  PRIMARY KEY (`id`)
1571
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1571
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1572
1572
1573
--
1573
--
1574
-- Table structure for table `oai_sets_descriptions`
1574
-- Table structure for table `oai_sets_descriptions`
Lines 1579-1585 CREATE TABLE `oai_sets_descriptions` ( Link Here
1579
  `set_id` int(11) NOT NULL,
1579
  `set_id` int(11) NOT NULL,
1580
  `description` varchar(255) NOT NULL,
1580
  `description` varchar(255) NOT NULL,
1581
  CONSTRAINT `oai_sets_descriptions_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1581
  CONSTRAINT `oai_sets_descriptions_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1582
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1582
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1583
1583
1584
--
1584
--
1585
-- Table structure for table `oai_sets_mappings`
1585
-- Table structure for table `oai_sets_mappings`
Lines 1593-1599 CREATE TABLE `oai_sets_mappings` ( Link Here
1593
  `operator` varchar(8) NOT NULL default 'equal',
1593
  `operator` varchar(8) NOT NULL default 'equal',
1594
  `marcvalue` varchar(80) NOT NULL,
1594
  `marcvalue` varchar(80) NOT NULL,
1595
  CONSTRAINT `oai_sets_mappings_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1595
  CONSTRAINT `oai_sets_mappings_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1596
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1596
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1597
1597
1598
--
1598
--
1599
-- Table structure for table `oai_sets_biblios`
1599
-- Table structure for table `oai_sets_biblios`
Lines 1606-1612 CREATE TABLE `oai_sets_biblios` ( Link Here
1606
  PRIMARY KEY (`biblionumber`, `set_id`),
1606
  PRIMARY KEY (`biblionumber`, `set_id`),
1607
  CONSTRAINT `oai_sets_biblios_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1607
  CONSTRAINT `oai_sets_biblios_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1608
  CONSTRAINT `oai_sets_biblios_ibfk_2` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1608
  CONSTRAINT `oai_sets_biblios_ibfk_2` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1609
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1609
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1610
1610
1611
--
1611
--
1612
-- Table structure for table `old_issues`
1612
-- Table structure for table `old_issues`
Lines 1636-1642 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1636
    ON DELETE SET NULL ON UPDATE SET NULL,
1636
    ON DELETE SET NULL ON UPDATE SET NULL,
1637
  CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
1637
  CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
1638
    ON DELETE SET NULL ON UPDATE SET NULL
1638
    ON DELETE SET NULL ON UPDATE SET NULL
1639
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1639
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1640
1640
1641
--
1641
--
1642
-- Table structure for table `old_reserves`
1642
-- Table structure for table `old_reserves`
Lines 1673-1679 CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b Link Here
1673
    ON DELETE SET NULL ON UPDATE SET NULL,
1673
    ON DELETE SET NULL ON UPDATE SET NULL,
1674
  CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
1674
  CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
1675
    ON DELETE SET NULL ON UPDATE SET NULL
1675
    ON DELETE SET NULL ON UPDATE SET NULL
1676
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1676
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1677
1677
1678
--
1678
--
1679
-- Table structure for table `opac_news`
1679
-- Table structure for table `opac_news`
Lines 1692-1698 CREATE TABLE `opac_news` ( -- data from the news tool Link Here
1692
  PRIMARY KEY  (`idnew`),
1692
  PRIMARY KEY  (`idnew`),
1693
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1693
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1694
    ON DELETE CASCADE ON UPDATE CASCADE
1694
    ON DELETE CASCADE ON UPDATE CASCADE
1695
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1695
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1696
1696
1697
--
1697
--
1698
-- Table structure for table `overduerules`
1698
-- Table structure for table `overduerules`
Lines 1712-1718 CREATE TABLE `overduerules` ( -- overdue notice status and triggers Link Here
1712
  `letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice
1712
  `letter3` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent as the third notice
1713
  `debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no)
1713
  `debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no)
1714
  PRIMARY KEY  (`branchcode`,`categorycode`)
1714
  PRIMARY KEY  (`branchcode`,`categorycode`)
1715
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1715
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1716
1716
1717
--
1717
--
1718
-- Table structure for table `patroncards`
1718
-- Table structure for table `patroncards`
Lines 1727-1733 CREATE TABLE `patroncards` ( Link Here
1727
   PRIMARY KEY  (`cardid`),
1727
   PRIMARY KEY  (`cardid`),
1728
   KEY `patroncards_ibfk_1` (`borrowernumber`),
1728
   KEY `patroncards_ibfk_1` (`borrowernumber`),
1729
   CONSTRAINT `patroncards_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1729
   CONSTRAINT `patroncards_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1730
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1730
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1731
1731
1732
--
1732
--
1733
-- Table structure for table `patronimage`
1733
-- Table structure for table `patronimage`
Lines 1740-1746 CREATE TABLE `patronimage` ( -- information related to patron images Link Here
1740
  `imagefile` mediumblob NOT NULL, -- the image
1740
  `imagefile` mediumblob NOT NULL, -- the image
1741
  PRIMARY KEY  (`borrowernumber`),
1741
  PRIMARY KEY  (`borrowernumber`),
1742
  CONSTRAINT `patronimage_fk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1742
  CONSTRAINT `patronimage_fk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1743
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1743
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1744
1744
1745
-- Table structure for table `pending_offline_operations`
1745
-- Table structure for table `pending_offline_operations`
1746
--
1746
--
Lines 1758-1764 CREATE TABLE pending_offline_operations ( Link Here
1758
  cardnumber varchar(16) DEFAULT NULL,
1758
  cardnumber varchar(16) DEFAULT NULL,
1759
  amount decimal(28,6) DEFAULT NULL,
1759
  amount decimal(28,6) DEFAULT NULL,
1760
  PRIMARY KEY (operationid)
1760
  PRIMARY KEY (operationid)
1761
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
1761
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1762
1762
1763
1763
1764
--
1764
--
Lines 1771-1777 CREATE TABLE `printers` ( Link Here
1771
  `printqueue` varchar(20) default NULL,
1771
  `printqueue` varchar(20) default NULL,
1772
  `printtype` varchar(20) default NULL,
1772
  `printtype` varchar(20) default NULL,
1773
  PRIMARY KEY  (`printername`)
1773
  PRIMARY KEY  (`printername`)
1774
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1774
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1775
1775
1776
--
1776
--
1777
-- Table structure for table `printers_profile`
1777
-- Table structure for table `printers_profile`
Lines 1791-1797 CREATE TABLE `printers_profile` ( Link Here
1791
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1791
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1792
  PRIMARY KEY  (`profile_id`),
1792
  PRIMARY KEY  (`profile_id`),
1793
  UNIQUE KEY `printername` (`printer_name`,`template_id`,`paper_bin`,`creator`)
1793
  UNIQUE KEY `printername` (`printer_name`,`template_id`,`paper_bin`,`creator`)
1794
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1794
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1795
1795
1796
--
1796
--
1797
-- Table structure for table `repeatable_holidays`
1797
-- Table structure for table `repeatable_holidays`
Lines 1807-1813 CREATE TABLE `repeatable_holidays` ( -- information for the days the library is Link Here
1807
  `title` varchar(50) NOT NULL default '', -- title of this closing
1807
  `title` varchar(50) NOT NULL default '', -- title of this closing
1808
  `description` text NOT NULL, -- description for this closing
1808
  `description` text NOT NULL, -- description for this closing
1809
  PRIMARY KEY  (`id`)
1809
  PRIMARY KEY  (`id`)
1810
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1810
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1811
1811
1812
--
1812
--
1813
-- Table structure for table `reports_dictionary`
1813
-- Table structure for table `reports_dictionary`
Lines 1824-1830 CREATE TABLE reports_dictionary ( -- definitions (or snippets of SQL) stored for Link Here
1824
   report_area varchar(6) DEFAULT NULL, -- Koha module this definition is for Circulation, Catalog, Patrons, Acquistions, Accounts)
1824
   report_area varchar(6) DEFAULT NULL, -- Koha module this definition is for Circulation, Catalog, Patrons, Acquistions, Accounts)
1825
   PRIMARY KEY  (id),
1825
   PRIMARY KEY  (id),
1826
   KEY dictionary_area_idx (report_area)
1826
   KEY dictionary_area_idx (report_area)
1827
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1827
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1828
1828
1829
--
1829
--
1830
-- Table structure for table `reserveconstraints`
1830
-- Table structure for table `reserveconstraints`
Lines 1837-1843 CREATE TABLE `reserveconstraints` ( Link Here
1837
  `biblionumber` int(11) NOT NULL default 0,
1837
  `biblionumber` int(11) NOT NULL default 0,
1838
  `biblioitemnumber` int(11) default NULL,
1838
  `biblioitemnumber` int(11) default NULL,
1839
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
1839
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
1840
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1840
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1841
1841
1842
--
1842
--
1843
-- Table structure for table `reserves`
1843
-- Table structure for table `reserves`
Lines 1874-1880 CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha Link Here
1874
  CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1874
  CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1875
  CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1875
  CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1876
  CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
1876
  CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
1877
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1877
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1878
1878
1879
--
1879
--
1880
-- Table structure for table `reviews`
1880
-- Table structure for table `reviews`
Lines 1891-1897 CREATE TABLE `reviews` ( -- patron opac comments Link Here
1891
  PRIMARY KEY  (`reviewid`),
1891
  PRIMARY KEY  (`reviewid`),
1892
  CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
1892
  CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
1893
  CONSTRAINT `reviews_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
1893
  CONSTRAINT `reviews_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
1894
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1894
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1895
1895
1896
--
1896
--
1897
-- Table structure for table `saved_sql`
1897
-- Table structure for table `saved_sql`
Lines 1916-1922 CREATE TABLE saved_sql ( -- saved sql reports Link Here
1916
   PRIMARY KEY  (`id`),
1916
   PRIMARY KEY  (`id`),
1917
   KEY sql_area_group_idx (report_group, report_subgroup),
1917
   KEY sql_area_group_idx (report_group, report_subgroup),
1918
   KEY boridx (`borrowernumber`)
1918
   KEY boridx (`borrowernumber`)
1919
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1919
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1920
1920
1921
1921
1922
--
1922
--
Lines 1930-1936 CREATE TABLE saved_reports ( Link Here
1930
   `report` longtext,
1930
   `report` longtext,
1931
   `date_run` datetime default NULL,
1931
   `date_run` datetime default NULL,
1932
   PRIMARY KEY  (`id`)
1932
   PRIMARY KEY  (`id`)
1933
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1933
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1934
1934
1935
1935
1936
--
1936
--
Lines 1969-1975 CREATE TABLE `serial` ( Link Here
1969
  claims_count int(11) default 0,
1969
  claims_count int(11) default 0,
1970
  `routingnotes` text,
1970
  `routingnotes` text,
1971
  PRIMARY KEY  (`serialid`)
1971
  PRIMARY KEY  (`serialid`)
1972
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1972
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1973
1973
1974
--
1974
--
1975
-- Table structure for table `sessions`
1975
-- Table structure for table `sessions`
Lines 1980-1986 CREATE TABLE sessions ( Link Here
1980
  `id` varchar(32) NOT NULL,
1980
  `id` varchar(32) NOT NULL,
1981
  `a_session` text NOT NULL,
1981
  `a_session` text NOT NULL,
1982
  PRIMARY KEY (`id`)
1982
  PRIMARY KEY (`id`)
1983
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1983
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1984
1984
1985
--
1985
--
1986
-- Table structure for table `special_holidays`
1986
-- Table structure for table `special_holidays`
Lines 1997-2003 CREATE TABLE `special_holidays` ( -- non repeatable holidays/library closings Link Here
1997
  `title` varchar(50) NOT NULL default '', -- title for this closing
1997
  `title` varchar(50) NOT NULL default '', -- title for this closing
1998
  `description` text NOT NULL, -- description of this closing
1998
  `description` text NOT NULL, -- description of this closing
1999
  PRIMARY KEY  (`id`)
1999
  PRIMARY KEY  (`id`)
2000
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2000
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2001
2001
2002
--
2002
--
2003
-- Table structure for table `statistics`
2003
-- Table structure for table `statistics`
Lines 2027-2033 CREATE TABLE `statistics` ( -- information related to transactions (circulation Link Here
2027
  KEY `borrowernumber_idx` (`borrowernumber`),
2027
  KEY `borrowernumber_idx` (`borrowernumber`),
2028
  KEY `associatedborrower_idx` (`associatedborrower`),
2028
  KEY `associatedborrower_idx` (`associatedborrower`),
2029
  KEY `ccode_idx` (`ccode`)
2029
  KEY `ccode_idx` (`ccode`)
2030
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2030
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2031
2031
2032
--
2032
--
2033
-- Table structure for table `stopwords`
2033
-- Table structure for table `stopwords`
Lines 2036-2042 CREATE TABLE `statistics` ( -- information related to transactions (circulation Link Here
2036
DROP TABLE IF EXISTS `stopwords`;
2036
DROP TABLE IF EXISTS `stopwords`;
2037
  CREATE TABLE `stopwords` (
2037
  CREATE TABLE `stopwords` (
2038
  `word` varchar(255) default NULL
2038
  `word` varchar(255) default NULL
2039
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2039
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2040
2040
2041
--
2041
--
2042
-- Table structure for table subscription_frequencies
2042
-- Table structure for table subscription_frequencies
Lines 2051-2057 CREATE TABLE subscription_frequencies ( Link Here
2051
    unitsperissue INTEGER NOT NULL DEFAULT '1',
2051
    unitsperissue INTEGER NOT NULL DEFAULT '1',
2052
    issuesperunit INTEGER NOT NULL DEFAULT '1',
2052
    issuesperunit INTEGER NOT NULL DEFAULT '1',
2053
    PRIMARY KEY (id)
2053
    PRIMARY KEY (id)
2054
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2054
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2055
2055
2056
--
2056
--
2057
-- Table structure for table subscription_numberpatterns
2057
-- Table structure for table subscription_numberpatterns
Lines 2083-2089 CREATE TABLE subscription_numberpatterns ( Link Here
2083
    setto3 INTEGER DEFAULT NULL,
2083
    setto3 INTEGER DEFAULT NULL,
2084
    numbering3 VARCHAR(255) DEFAULT NULL,
2084
    numbering3 VARCHAR(255) DEFAULT NULL,
2085
    PRIMARY KEY (id)
2085
    PRIMARY KEY (id)
2086
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2086
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2087
2087
2088
--
2088
--
2089
-- Table structure for table `subscription`
2089
-- Table structure for table `subscription`
Lines 2134-2140 CREATE TABLE `subscription` ( Link Here
2134
  PRIMARY KEY  (`subscriptionid`),
2134
  PRIMARY KEY  (`subscriptionid`),
2135
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2135
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2136
  CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE
2136
  CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE
2137
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2137
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2138
2138
2139
--
2139
--
2140
-- Table structure for table `subscriptionhistory`
2140
-- Table structure for table `subscriptionhistory`
Lines 2152-2158 CREATE TABLE `subscriptionhistory` ( Link Here
2152
  `librariannote` varchar(150) NOT NULL default '',
2152
  `librariannote` varchar(150) NOT NULL default '',
2153
  PRIMARY KEY  (`subscriptionid`),
2153
  PRIMARY KEY  (`subscriptionid`),
2154
  KEY `biblionumber` (`biblionumber`)
2154
  KEY `biblionumber` (`biblionumber`)
2155
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2155
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2156
2156
2157
--
2157
--
2158
-- Table structure for table `subscriptionroutinglist`
2158
-- Table structure for table `subscriptionroutinglist`
Lines 2170-2176 CREATE TABLE `subscriptionroutinglist` ( -- information related to the routing l Link Here
2170
    ON DELETE CASCADE ON UPDATE CASCADE,
2170
    ON DELETE CASCADE ON UPDATE CASCADE,
2171
  CONSTRAINT `subscriptionroutinglist_ibfk_2` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`)
2171
  CONSTRAINT `subscriptionroutinglist_ibfk_2` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`)
2172
    ON DELETE CASCADE ON UPDATE CASCADE
2172
    ON DELETE CASCADE ON UPDATE CASCADE
2173
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2173
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2174
2174
2175
--
2175
--
2176
-- Table structure for table `suggestions`
2176
-- Table structure for table `suggestions`
Lines 2213-2219 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
2213
  PRIMARY KEY  (`suggestionid`),
2213
  PRIMARY KEY  (`suggestionid`),
2214
  KEY `suggestedby` (`suggestedby`),
2214
  KEY `suggestedby` (`suggestedby`),
2215
  KEY `managedby` (`managedby`)
2215
  KEY `managedby` (`managedby`)
2216
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2216
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2217
2217
2218
--
2218
--
2219
-- Table structure for table `systempreferences`
2219
-- Table structure for table `systempreferences`
Lines 2227-2233 CREATE TABLE `systempreferences` ( -- global system preferences Link Here
2227
  `explanation` text, -- descriptive text for the system preference
2227
  `explanation` text, -- descriptive text for the system preference
2228
  `type` varchar(20) default NULL, -- type of question this preference asks (multiple choice, plain text, yes or no, etc)
2228
  `type` varchar(20) default NULL, -- type of question this preference asks (multiple choice, plain text, yes or no, etc)
2229
  PRIMARY KEY  (`variable`)
2229
  PRIMARY KEY  (`variable`)
2230
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2230
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2231
2231
2232
--
2232
--
2233
-- Table structure for table `tags`
2233
-- Table structure for table `tags`
Lines 2238-2244 CREATE TABLE `tags` ( Link Here
2238
  `entry` varchar(255) NOT NULL default '',
2238
  `entry` varchar(255) NOT NULL default '',
2239
  `weight` bigint(20) NOT NULL default 0,
2239
  `weight` bigint(20) NOT NULL default 0,
2240
  PRIMARY KEY  (`entry`)
2240
  PRIMARY KEY  (`entry`)
2241
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2241
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2242
2242
2243
--
2243
--
2244
-- Table structure for table `tags_all`
2244
-- Table structure for table `tags_all`
Lines 2259-2265 CREATE TABLE `tags_all` ( -- all of the tags Link Here
2259
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2259
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2260
  CONSTRAINT `tags_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2260
  CONSTRAINT `tags_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2261
        REFERENCES `biblio`     (`biblionumber`)  ON DELETE CASCADE ON UPDATE CASCADE
2261
        REFERENCES `biblio`     (`biblionumber`)  ON DELETE CASCADE ON UPDATE CASCADE
2262
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2262
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2263
2263
2264
--
2264
--
2265
-- Table structure for table `tags_approval`
2265
-- Table structure for table `tags_approval`
Lines 2276-2282 CREATE TABLE `tags_approval` ( -- approved tags Link Here
2276
  KEY `tags_approval_borrowers_fk_1` (`approved_by`),
2276
  KEY `tags_approval_borrowers_fk_1` (`approved_by`),
2277
  CONSTRAINT `tags_approval_borrowers_fk_1` FOREIGN KEY (`approved_by`)
2277
  CONSTRAINT `tags_approval_borrowers_fk_1` FOREIGN KEY (`approved_by`)
2278
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
2278
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
2279
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2279
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2280
2280
2281
--
2281
--
2282
-- Table structure for table `tags_index`
2282
-- Table structure for table `tags_index`
Lines 2293-2299 CREATE TABLE `tags_index` ( -- a weighted list of all tags and where they are us Link Here
2293
        REFERENCES `tags_approval` (`term`)  ON DELETE CASCADE ON UPDATE CASCADE,
2293
        REFERENCES `tags_approval` (`term`)  ON DELETE CASCADE ON UPDATE CASCADE,
2294
  CONSTRAINT `tags_index_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2294
  CONSTRAINT `tags_index_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2295
        REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
2295
        REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
2296
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2296
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2297
2297
2298
--
2298
--
2299
-- Table structure for table `userflags`
2299
-- Table structure for table `userflags`
Lines 2306-2312 CREATE TABLE `userflags` ( Link Here
2306
  `flagdesc` varchar(255) default NULL,
2306
  `flagdesc` varchar(255) default NULL,
2307
  `defaulton` int(11) default NULL,
2307
  `defaulton` int(11) default NULL,
2308
  PRIMARY KEY  (`bit`)
2308
  PRIMARY KEY  (`bit`)
2309
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2309
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2310
2310
2311
--
2311
--
2312
-- Table structure for table `virtualshelves`
2312
-- Table structure for table `virtualshelves`
Lines 2325-2331 CREATE TABLE `virtualshelves` ( -- information about lists (or virtual shelves) Link Here
2325
  `allow_delete_other` tinyint(1) default 0, -- permission for deleting entries from list that another person added
2325
  `allow_delete_other` tinyint(1) default 0, -- permission for deleting entries from list that another person added
2326
  PRIMARY KEY  (`shelfnumber`),
2326
  PRIMARY KEY  (`shelfnumber`),
2327
  CONSTRAINT `virtualshelves_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL -- no cascaded delete, please see HandleDelBorrower in VirtualShelves.pm
2327
  CONSTRAINT `virtualshelves_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL -- no cascaded delete, please see HandleDelBorrower in VirtualShelves.pm
2328
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2328
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2329
2329
2330
--
2330
--
2331
-- Table structure for table `virtualshelfcontents`
2331
-- Table structure for table `virtualshelfcontents`
Lines 2343-2349 CREATE TABLE `virtualshelfcontents` ( -- information about the titles in a list Link Here
2343
  CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2343
  CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2344
  CONSTRAINT `shelfcontents_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2344
  CONSTRAINT `shelfcontents_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2345
  CONSTRAINT `shelfcontents_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL -- no cascaded delete, please see HandleDelBorrower in VirtualShelves.pm
2345
  CONSTRAINT `shelfcontents_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL -- no cascaded delete, please see HandleDelBorrower in VirtualShelves.pm
2346
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2346
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2347
2347
2348
--
2348
--
2349
-- Table structure for table `virtualshelfshares`
2349
-- Table structure for table `virtualshelfshares`
Lines 2358-2364 CREATE TABLE `virtualshelfshares` ( -- shared private lists Link Here
2358
  `sharedate` datetime,  -- date of invitation or acceptance of invitation
2358
  `sharedate` datetime,  -- date of invitation or acceptance of invitation
2359
  CONSTRAINT `virtualshelfshares_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2359
  CONSTRAINT `virtualshelfshares_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2360
  CONSTRAINT `virtualshelfshares_ibfk_2` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL -- no cascaded delete, please see HandleDelBorrower in VirtualShelves.pm
2360
  CONSTRAINT `virtualshelfshares_ibfk_2` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL -- no cascaded delete, please see HandleDelBorrower in VirtualShelves.pm
2361
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2361
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2362
2362
2363
--
2363
--
2364
-- Table structure for table `z3950servers`
2364
-- Table structure for table `z3950servers`
Lines 2384-2390 CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets u Link Here
2384
  `sru_fields` mediumtext default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2384
  `sru_fields` mediumtext default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2385
  `add_xslt` mediumtext default NULL, -- zero or more paths to XSLT files to be processed on the search results
2385
  `add_xslt` mediumtext default NULL, -- zero or more paths to XSLT files to be processed on the search results
2386
  PRIMARY KEY  (`id`)
2386
  PRIMARY KEY  (`id`)
2387
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2387
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2388
2388
2389
--
2389
--
2390
-- Table structure for table `zebraqueue`
2390
-- Table structure for table `zebraqueue`
Lines 2400-2406 CREATE TABLE `zebraqueue` ( Link Here
2400
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
2400
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
2401
  PRIMARY KEY  (`id`),
2401
  PRIMARY KEY  (`id`),
2402
  KEY `zebraqueue_lookup` (`server`, `biblio_auth_number`, `operation`, `done`)
2402
  KEY `zebraqueue_lookup` (`server`, `biblio_auth_number`, `operation`, `done`)
2403
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2403
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2404
2404
2405
--
2405
--
2406
-- Table structure for table `services_throttle`
2406
-- Table structure for table `services_throttle`
Lines 2411-2417 CREATE TABLE `services_throttle` ( Link Here
2411
  `service_type` varchar(10) NOT NULL default '',
2411
  `service_type` varchar(10) NOT NULL default '',
2412
  `service_count` varchar(45) default NULL,
2412
  `service_count` varchar(45) default NULL,
2413
  PRIMARY KEY  (`service_type`)
2413
  PRIMARY KEY  (`service_type`)
2414
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2414
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2415
2415
2416
--
2416
--
2417
-- Table structure for table `language_subtag_registry`
2417
-- Table structure for table `language_subtag_registry`
Lines 2428-2434 CREATE TABLE language_subtag_registry ( Link Here
2428
        id int(11) NOT NULL auto_increment,
2428
        id int(11) NOT NULL auto_increment,
2429
        PRIMARY KEY  (`id`),
2429
        PRIMARY KEY  (`id`),
2430
        KEY `subtag` (`subtag`)
2430
        KEY `subtag` (`subtag`)
2431
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2431
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2432
2432
2433
--
2433
--
2434
-- Table structure for table `language_rfc4646_to_iso639`
2434
-- Table structure for table `language_rfc4646_to_iso639`
Lines 2444-2450 CREATE TABLE language_rfc4646_to_iso639 ( Link Here
2444
        id int(11) NOT NULL auto_increment,
2444
        id int(11) NOT NULL auto_increment,
2445
        PRIMARY KEY  (`id`),
2445
        PRIMARY KEY  (`id`),
2446
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2446
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2447
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2447
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2448
2448
2449
--
2449
--
2450
-- Table structure for table `language_descriptions`
2450
-- Table structure for table `language_descriptions`
Lines 2460-2466 CREATE TABLE language_descriptions ( Link Here
2460
        PRIMARY KEY  (`id`),
2460
        PRIMARY KEY  (`id`),
2461
        KEY `lang` (`lang`),
2461
        KEY `lang` (`lang`),
2462
        KEY `subtag_type_lang` (`subtag`, `type`, `lang`)
2462
        KEY `subtag_type_lang` (`subtag`, `type`, `lang`)
2463
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2463
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2464
2464
2465
--
2465
--
2466
-- Table structure for table `language_script_bidi`
2466
-- Table structure for table `language_script_bidi`
Lines 2472-2478 CREATE TABLE language_script_bidi ( Link Here
2472
        rfc4646_subtag varchar(25), -- script subtag, Arab, Hebr, etc.
2472
        rfc4646_subtag varchar(25), -- script subtag, Arab, Hebr, etc.
2473
        bidi varchar(3), -- rtl ltr
2473
        bidi varchar(3), -- rtl ltr
2474
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2474
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2475
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2475
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2476
2476
2477
--
2477
--
2478
-- Table structure for table `language_script_mapping`
2478
-- Table structure for table `language_script_mapping`
Lines 2485-2491 CREATE TABLE language_script_mapping ( Link Here
2485
        language_subtag varchar(25),
2485
        language_subtag varchar(25),
2486
        script_subtag varchar(25),
2486
        script_subtag varchar(25),
2487
        KEY `language_subtag` (`language_subtag`)
2487
        KEY `language_subtag` (`language_subtag`)
2488
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2488
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2489
2489
2490
--
2490
--
2491
-- Table structure for table `permissions`
2491
-- Table structure for table `permissions`
Lines 2499-2505 CREATE TABLE `permissions` ( Link Here
2499
  PRIMARY KEY  (`module_bit`, `code`),
2499
  PRIMARY KEY  (`module_bit`, `code`),
2500
  CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`)
2500
  CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`)
2501
    ON DELETE CASCADE ON UPDATE CASCADE
2501
    ON DELETE CASCADE ON UPDATE CASCADE
2502
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2502
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2503
2503
2504
--
2504
--
2505
-- Table structure for table `serialitems`
2505
-- Table structure for table `serialitems`
Lines 2507-2519 CREATE TABLE `permissions` ( Link Here
2507
2507
2508
DROP TABLE IF EXISTS `serialitems`;
2508
DROP TABLE IF EXISTS `serialitems`;
2509
CREATE TABLE `serialitems` (
2509
CREATE TABLE `serialitems` (
2510
    `itemnumber` int(11) NOT NULL,
2510
	`itemnumber` int(11) NOT NULL,
2511
    `serialid` int(11) NOT NULL,
2511
	`serialid` int(11) NOT NULL,
2512
    UNIQUE KEY `serialitemsidx` (`itemnumber`),
2512
	UNIQUE KEY `serialitemsidx` (`itemnumber`),
2513
    KEY `serialitems_sfk_1` (`serialid`),
2513
	KEY `serialitems_sfk_1` (`serialid`),
2514
    CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2514
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2515
    CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2515
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2516
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2516
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2517
2517
2518
--
2518
--
2519
-- Table structure for table `user_permissions`
2519
-- Table structure for table `user_permissions`
Lines 2528-2534 CREATE TABLE `user_permissions` ( Link Here
2528
    ON DELETE CASCADE ON UPDATE CASCADE,
2528
    ON DELETE CASCADE ON UPDATE CASCADE,
2529
  CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY (`module_bit`, `code`) REFERENCES `permissions` (`module_bit`, `code`)
2529
  CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY (`module_bit`, `code`) REFERENCES `permissions` (`module_bit`, `code`)
2530
    ON DELETE CASCADE ON UPDATE CASCADE
2530
    ON DELETE CASCADE ON UPDATE CASCADE
2531
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2531
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2532
2532
2533
--
2533
--
2534
-- Table structure for table `tmp_holdsqueue`
2534
-- Table structure for table `tmp_holdsqueue`
Lines 2551-2557 CREATE TABLE `tmp_holdsqueue` ( Link Here
2551
  `pickbranch` varchar(10) default NULL,
2551
  `pickbranch` varchar(10) default NULL,
2552
  `notes` text,
2552
  `notes` text,
2553
  `item_level_request` tinyint(4) NOT NULL default 0
2553
  `item_level_request` tinyint(4) NOT NULL default 0
2554
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2554
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2555
2555
2556
--
2556
--
2557
-- Table structure for table `message_queue`
2557
-- Table structure for table `message_queue`
Lines 2576-2582 CREATE TABLE `message_queue` ( Link Here
2576
  KEY `message_transport_type` (`message_transport_type`),
2576
  KEY `message_transport_type` (`message_transport_type`),
2577
  CONSTRAINT `messageq_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2577
  CONSTRAINT `messageq_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2578
  CONSTRAINT `messageq_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE RESTRICT ON UPDATE CASCADE
2578
  CONSTRAINT `messageq_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE RESTRICT ON UPDATE CASCADE
2579
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2579
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2580
2580
2581
--
2581
--
2582
-- Table structure for table `message_transport_types`
2582
-- Table structure for table `message_transport_types`
Lines 2586-2592 DROP TABLE IF EXISTS `message_transport_types`; Link Here
2586
CREATE TABLE `message_transport_types` (
2586
CREATE TABLE `message_transport_types` (
2587
  `message_transport_type` varchar(20) NOT NULL,
2587
  `message_transport_type` varchar(20) NOT NULL,
2588
  PRIMARY KEY  (`message_transport_type`)
2588
  PRIMARY KEY  (`message_transport_type`)
2589
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2589
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2590
2590
2591
--
2591
--
2592
-- Table structure for table `overduerules_transport_types`
2592
-- Table structure for table `overduerules_transport_types`
Lines 2602-2608 CREATE TABLE overduerules_transport_types( Link Here
2602
    PRIMARY KEY (id),
2602
    PRIMARY KEY (id),
2603
    CONSTRAINT overduerules_fk FOREIGN KEY (branchcode, categorycode) REFERENCES overduerules (branchcode, categorycode) ON DELETE CASCADE ON UPDATE CASCADE,
2603
    CONSTRAINT overduerules_fk FOREIGN KEY (branchcode, categorycode) REFERENCES overduerules (branchcode, categorycode) ON DELETE CASCADE ON UPDATE CASCADE,
2604
    CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE
2604
    CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE
2605
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2605
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2606
2606
2607
--
2607
--
2608
-- Table structure for table `message_attributes`
2608
-- Table structure for table `message_attributes`
Lines 2615-2621 CREATE TABLE `message_attributes` ( Link Here
2615
  `takes_days` tinyint(1) NOT NULL default '0',
2615
  `takes_days` tinyint(1) NOT NULL default '0',
2616
  PRIMARY KEY  (`message_attribute_id`),
2616
  PRIMARY KEY  (`message_attribute_id`),
2617
  UNIQUE KEY `message_name` (`message_name`)
2617
  UNIQUE KEY `message_name` (`message_name`)
2618
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2618
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2619
2619
2620
--
2620
--
2621
-- Table structure for table `message_transports`
2621
-- Table structure for table `message_transports`
Lines 2635-2641 CREATE TABLE `message_transports` ( Link Here
2635
  CONSTRAINT `message_transports_ibfk_1` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2635
  CONSTRAINT `message_transports_ibfk_1` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2636
  CONSTRAINT `message_transports_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE,
2636
  CONSTRAINT `message_transports_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE,
2637
  CONSTRAINT `message_transports_ibfk_3` FOREIGN KEY (`letter_module`, `letter_code`, `branchcode`) REFERENCES `letter` (`module`, `code`, `branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
2637
  CONSTRAINT `message_transports_ibfk_3` FOREIGN KEY (`letter_module`, `letter_code`, `branchcode`) REFERENCES `letter` (`module`, `code`, `branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
2638
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2638
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2639
2639
2640
--
2640
--
2641
-- Table structure for table `borrower_files`
2641
-- Table structure for table `borrower_files`
Lines 2653-2659 CREATE TABLE IF NOT EXISTS `borrower_files` ( -- files attached to the patron/bo Link Here
2653
  PRIMARY KEY (`file_id`),
2653
  PRIMARY KEY (`file_id`),
2654
  KEY `borrowernumber` (`borrowernumber`),
2654
  KEY `borrowernumber` (`borrowernumber`),
2655
  CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
2655
  CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
2656
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2656
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2657
2657
2658
--
2658
--
2659
-- Table structure for table `borrower_message_preferences`
2659
-- Table structure for table `borrower_message_preferences`
Lines 2674-2680 CREATE TABLE `borrower_message_preferences` ( Link Here
2674
  CONSTRAINT `borrower_message_preferences_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2674
  CONSTRAINT `borrower_message_preferences_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2675
  CONSTRAINT `borrower_message_preferences_ibfk_2` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2675
  CONSTRAINT `borrower_message_preferences_ibfk_2` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2676
  CONSTRAINT `borrower_message_preferences_ibfk_3` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
2676
  CONSTRAINT `borrower_message_preferences_ibfk_3` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
2677
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2677
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2678
2678
2679
--
2679
--
2680
-- Table structure for table `borrower_message_transport_preferences`
2680
-- Table structure for table `borrower_message_transport_preferences`
Lines 2688-2694 CREATE TABLE `borrower_message_transport_preferences` ( Link Here
2688
  KEY `message_transport_type` (`message_transport_type`),
2688
  KEY `message_transport_type` (`message_transport_type`),
2689
  CONSTRAINT `borrower_message_transport_preferences_ibfk_1` FOREIGN KEY (`borrower_message_preference_id`) REFERENCES `borrower_message_preferences` (`borrower_message_preference_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2689
  CONSTRAINT `borrower_message_transport_preferences_ibfk_1` FOREIGN KEY (`borrower_message_preference_id`) REFERENCES `borrower_message_preferences` (`borrower_message_preference_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2690
  CONSTRAINT `borrower_message_transport_preferences_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2690
  CONSTRAINT `borrower_message_transport_preferences_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2691
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2691
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2692
2692
2693
--
2693
--
2694
-- Table structure for the table branch_transfer_limits
2694
-- Table structure for the table branch_transfer_limits
Lines 2702-2708 CREATE TABLE branch_transfer_limits ( Link Here
2702
    itemtype varchar(10) NULL,
2702
    itemtype varchar(10) NULL,
2703
    ccode varchar(10) NULL,
2703
    ccode varchar(10) NULL,
2704
    PRIMARY KEY  (limitId)
2704
    PRIMARY KEY  (limitId)
2705
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2705
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2706
2706
2707
--
2707
--
2708
-- Table structure for table `item_circulation_alert_preferences`
2708
-- Table structure for table `item_circulation_alert_preferences`
Lines 2717-2723 CREATE TABLE `item_circulation_alert_preferences` ( Link Here
2717
  `notification` varchar(16) NOT NULL,
2717
  `notification` varchar(16) NOT NULL,
2718
  PRIMARY KEY  (`id`),
2718
  PRIMARY KEY  (`id`),
2719
  KEY `branchcode` (`branchcode`,`categorycode`,`item_type`, `notification`)
2719
  KEY `branchcode` (`branchcode`,`categorycode`,`item_type`, `notification`)
2720
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2720
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2721
2721
2722
--
2722
--
2723
-- Table structure for table `messages`
2723
-- Table structure for table `messages`
Lines 2731-2737 CREATE TABLE `messages` ( -- circulation messages left via the patron's check ou Link Here
2731
  `message` text NOT NULL, -- the text of the message
2731
  `message` text NOT NULL, -- the text of the message
2732
  `message_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- the date and time the message was written
2732
  `message_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -- the date and time the message was written
2733
  PRIMARY KEY (`message_id`)
2733
  PRIMARY KEY (`message_id`)
2734
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2734
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2735
2735
2736
--
2736
--
2737
-- Table structure for table `accountlines`
2737
-- Table structure for table `accountlines`
Lines 2761-2767 CREATE TABLE `accountlines` ( Link Here
2761
  KEY `itemnumber` (`itemnumber`),
2761
  KEY `itemnumber` (`itemnumber`),
2762
  CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2762
  CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2763
  CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL
2763
  CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL
2764
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2764
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2765
2765
2766
--
2766
--
2767
-- Table structure for table `accountoffsets`
2767
-- Table structure for table `accountoffsets`
Lines 2775-2781 CREATE TABLE `accountoffsets` ( Link Here
2775
  `offsetamount` decimal(28,6) default NULL,
2775
  `offsetamount` decimal(28,6) default NULL,
2776
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2776
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2777
  CONSTRAINT `accountoffsets_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
2777
  CONSTRAINT `accountoffsets_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
2778
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2778
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2779
2779
2780
--
2780
--
2781
-- Table structure for table `action_logs`
2781
-- Table structure for table `action_logs`
Lines 2797-2803 CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the Link Here
2797
  KEY `action_idx` (`action`(255)),
2797
  KEY `action_idx` (`action`(255)),
2798
  KEY `object_idx` (`object`),
2798
  KEY `object_idx` (`object`),
2799
  KEY `info_idx` (`info`(255))
2799
  KEY `info_idx` (`info`(255))
2800
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2800
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2801
2801
2802
--
2802
--
2803
-- Table structure for table `alert`
2803
-- Table structure for table `alert`
Lines 2812-2818 CREATE TABLE `alert` ( Link Here
2812
  PRIMARY KEY  (`alertid`),
2812
  PRIMARY KEY  (`alertid`),
2813
  KEY `borrowernumber` (`borrowernumber`),
2813
  KEY `borrowernumber` (`borrowernumber`),
2814
  KEY `type` (`type`,`externalid`)
2814
  KEY `type` (`type`,`externalid`)
2815
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2815
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2816
2816
2817
--
2817
--
2818
-- Table structure for table `aqbasketgroups`
2818
-- Table structure for table `aqbasketgroups`
Lines 2831-2837 CREATE TABLE `aqbasketgroups` ( Link Here
2831
  PRIMARY KEY  (`id`),
2831
  PRIMARY KEY  (`id`),
2832
  KEY `booksellerid` (`booksellerid`),
2832
  KEY `booksellerid` (`booksellerid`),
2833
  CONSTRAINT `aqbasketgroups_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
2833
  CONSTRAINT `aqbasketgroups_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
2834
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2834
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2835
2835
2836
--
2836
--
2837
-- Table structure for table `aqbasket`
2837
-- Table structure for table `aqbasket`
Lines 2861-2867 CREATE TABLE `aqbasket` ( -- stores data about baskets in acquisitions Link Here
2861
  CONSTRAINT `aqbasket_ibfk_2` FOREIGN KEY (`contractnumber`) REFERENCES `aqcontract` (`contractnumber`),
2861
  CONSTRAINT `aqbasket_ibfk_2` FOREIGN KEY (`contractnumber`) REFERENCES `aqcontract` (`contractnumber`),
2862
  CONSTRAINT `aqbasket_ibfk_3` FOREIGN KEY (`basketgroupid`) REFERENCES `aqbasketgroups` (`id`) ON UPDATE CASCADE,
2862
  CONSTRAINT `aqbasket_ibfk_3` FOREIGN KEY (`basketgroupid`) REFERENCES `aqbasketgroups` (`id`) ON UPDATE CASCADE,
2863
  CONSTRAINT aqbasket_ibfk_4 FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE SET NULL
2863
  CONSTRAINT aqbasket_ibfk_4 FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE SET NULL
2864
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2864
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2865
2865
2866
--
2866
--
2867
-- Table structure for table aqbasketusers
2867
-- Table structure for table aqbasketusers
Lines 2874-2880 CREATE TABLE aqbasketusers ( Link Here
2874
  PRIMARY KEY (basketno,borrowernumber),
2874
  PRIMARY KEY (basketno,borrowernumber),
2875
  CONSTRAINT aqbasketusers_ibfk_1 FOREIGN KEY (basketno) REFERENCES aqbasket (basketno) ON UPDATE CASCADE ON DELETE CASCADE,
2875
  CONSTRAINT aqbasketusers_ibfk_1 FOREIGN KEY (basketno) REFERENCES aqbasket (basketno) ON UPDATE CASCADE ON DELETE CASCADE,
2876
  CONSTRAINT aqbasketusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON UPDATE CASCADE ON DELETE CASCADE
2876
  CONSTRAINT aqbasketusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON UPDATE CASCADE ON DELETE CASCADE
2877
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2877
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2878
2878
2879
--
2879
--
2880
-- Table structure for table `aqbooksellers`
2880
-- Table structure for table `aqbooksellers`
Lines 2913-2919 CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquis Link Here
2913
  KEY `invoiceprice` (`invoiceprice`),
2913
  KEY `invoiceprice` (`invoiceprice`),
2914
  CONSTRAINT `aqbooksellers_ibfk_1` FOREIGN KEY (`listprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE,
2914
  CONSTRAINT `aqbooksellers_ibfk_1` FOREIGN KEY (`listprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE,
2915
  CONSTRAINT `aqbooksellers_ibfk_2` FOREIGN KEY (`invoiceprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE
2915
  CONSTRAINT `aqbooksellers_ibfk_2` FOREIGN KEY (`invoiceprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE
2916
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2916
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2917
2917
2918
--
2918
--
2919
-- Table structure for table `aqbudgets`
2919
-- Table structure for table `aqbudgets`
Lines 2937-2943 CREATE TABLE `aqbudgets` ( -- information related to Funds Link Here
2937
  `budget_owner_id` int(11) default NULL, -- borrowernumber of the person who owns this fund (borrowers.borrowernumber)
2937
  `budget_owner_id` int(11) default NULL, -- borrowernumber of the person who owns this fund (borrowers.borrowernumber)
2938
  `budget_permission` int(1) default '0', -- level of permission for this fund (used only by the owner, only by the library, or anyone)
2938
  `budget_permission` int(1) default '0', -- level of permission for this fund (used only by the owner, only by the library, or anyone)
2939
  PRIMARY KEY  (`budget_id`)
2939
  PRIMARY KEY  (`budget_id`)
2940
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2940
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2941
2941
2942
--
2942
--
2943
-- Table structure for table aqbudgetborrowers
2943
-- Table structure for table aqbudgetborrowers
Lines 2954-2960 CREATE TABLE aqbudgetborrowers ( Link Here
2954
  CONSTRAINT aqbudgetborrowers_ibfk_2 FOREIGN KEY (borrowernumber)
2954
  CONSTRAINT aqbudgetborrowers_ibfk_2 FOREIGN KEY (borrowernumber)
2955
    REFERENCES borrowers (borrowernumber)
2955
    REFERENCES borrowers (borrowernumber)
2956
    ON DELETE CASCADE ON UPDATE CASCADE
2956
    ON DELETE CASCADE ON UPDATE CASCADE
2957
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2957
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2958
2958
2959
--
2959
--
2960
-- Table structure for table `aqbudgetperiods`
2960
-- Table structure for table `aqbudgetperiods`
Lines 2973-2979 CREATE TABLE `aqbudgetperiods` ( -- information related to Budgets Link Here
2973
  `sort1_authcat` varchar(10) default NULL, -- statistical category for this budget
2973
  `sort1_authcat` varchar(10) default NULL, -- statistical category for this budget
2974
  `sort2_authcat` varchar(10) default NULL, -- second statistical category for this budget
2974
  `sort2_authcat` varchar(10) default NULL, -- second statistical category for this budget
2975
  PRIMARY KEY  (`budget_period_id`)
2975
  PRIMARY KEY  (`budget_period_id`)
2976
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2976
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2977
2977
2978
--
2978
--
2979
-- Table structure for table `aqbudgets_planning`
2979
-- Table structure for table `aqbudgets_planning`
Lines 2990-2996 CREATE TABLE `aqbudgets_planning` ( Link Here
2990
  `display` tinyint(1) DEFAULT 1,
2990
  `display` tinyint(1) DEFAULT 1,
2991
  PRIMARY KEY  (`plan_id`),
2991
  PRIMARY KEY  (`plan_id`),
2992
  CONSTRAINT `aqbudgets_planning_ifbk_1` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE
2992
  CONSTRAINT `aqbudgets_planning_ifbk_1` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE
2993
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2993
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2994
2994
2995
--
2995
--
2996
-- Table structure for table 'aqcontacts'
2996
-- Table structure for table 'aqcontacts'
Lines 3084-3090 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
3084
  CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE,
3084
  CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE,
3085
  CONSTRAINT aqorders_ibfk_3 FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE SET NULL ON UPDATE CASCADE,
3085
  CONSTRAINT aqorders_ibfk_3 FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE SET NULL ON UPDATE CASCADE,
3086
  CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE
3086
  CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE
3087
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3087
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3088
3088
3089
3089
3090
--
3090
--
Lines 3099-3105 CREATE TABLE `aqorders_items` ( -- information on items entered in the acquisiti Link Here
3099
  PRIMARY KEY  (`itemnumber`),
3099
  PRIMARY KEY  (`itemnumber`),
3100
  KEY `ordernumber` (`ordernumber`),
3100
  KEY `ordernumber` (`ordernumber`),
3101
  CONSTRAINT aqorders_items_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE
3101
  CONSTRAINT aqorders_items_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE
3102
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3102
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3103
3103
3104
3104
3105
--
3105
--
Lines 3115-3121 CREATE TABLE aqorders_transfers ( Link Here
3115
  UNIQUE KEY ordernumber_to (ordernumber_to),
3115
  UNIQUE KEY ordernumber_to (ordernumber_to),
3116
  CONSTRAINT aqorders_transfers_ordernumber_from FOREIGN KEY (ordernumber_from) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE,
3116
  CONSTRAINT aqorders_transfers_ordernumber_from FOREIGN KEY (ordernumber_from) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE,
3117
  CONSTRAINT aqorders_transfers_ordernumber_to FOREIGN KEY (ordernumber_to) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE
3117
  CONSTRAINT aqorders_transfers_ordernumber_to FOREIGN KEY (ordernumber_to) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE
3118
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3118
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3119
3119
3120
--
3120
--
3121
-- Table structure for table aqinvoices
3121
-- Table structure for table aqinvoices
Lines 3134-3140 CREATE TABLE aqinvoices ( Link Here
3134
  PRIMARY KEY (invoiceid),
3134
  PRIMARY KEY (invoiceid),
3135
  CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE,
3135
  CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE,
3136
  CONSTRAINT aqinvoices_fk_shipmentcost_budgetid FOREIGN KEY (shipmentcost_budgetid) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE
3136
  CONSTRAINT aqinvoices_fk_shipmentcost_budgetid FOREIGN KEY (shipmentcost_budgetid) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE
3137
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3137
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3138
3138
3139
3139
3140
--
3140
--
Lines 3149-3155 CREATE TABLE `fieldmapping` ( -- koha to keyword mapping Link Here
3149
  `fieldcode` char(3) NOT NULL, -- marc field number to map to this keyword
3149
  `fieldcode` char(3) NOT NULL, -- marc field number to map to this keyword
3150
  `subfieldcode` char(1) NOT NULL, -- marc subfield associated with the fieldcode to map to this keyword
3150
  `subfieldcode` char(1) NOT NULL, -- marc subfield associated with the fieldcode to map to this keyword
3151
  PRIMARY KEY  (`id`)
3151
  PRIMARY KEY  (`id`)
3152
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3152
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3153
3153
3154
--
3154
--
3155
-- Table structure for table `transport_cost`
3155
-- Table structure for table `transport_cost`
Lines 3165-3171 CREATE TABLE transport_cost ( Link Here
3165
      PRIMARY KEY (frombranch, tobranch),
3165
      PRIMARY KEY (frombranch, tobranch),
3166
      CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE,
3166
      CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE,
3167
      CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3167
      CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3168
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3168
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3169
3169
3170
--
3170
--
3171
-- Table structure for table `biblioimages`
3171
-- Table structure for table `biblioimages`
Lines 3181-3187 CREATE TABLE `biblioimages` ( -- local cover images Link Here
3181
 `thumbnail` mediumblob NOT NULL, -- thumbnail file contents
3181
 `thumbnail` mediumblob NOT NULL, -- thumbnail file contents
3182
 PRIMARY KEY (`imagenumber`),
3182
 PRIMARY KEY (`imagenumber`),
3183
 CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
3183
 CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
3184
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3184
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3185
3185
3186
--
3186
--
3187
-- Table structure for table `social_data`
3187
-- Table structure for table `social_data`
Lines 3197-3203 CREATE TABLE IF NOT EXISTS `social_data` ( Link Here
3197
  `score_avg` DECIMAL(5,2),
3197
  `score_avg` DECIMAL(5,2),
3198
  `num_scores` INT,
3198
  `num_scores` INT,
3199
  PRIMARY KEY  (`isbn`)
3199
  PRIMARY KEY  (`isbn`)
3200
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3200
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3201
3201
3202
--
3202
--
3203
-- 'Ratings' table. This tracks the star ratings set by borrowers.
3203
-- 'Ratings' table. This tracks the star ratings set by borrowers.
Lines 3212-3218 CREATE TABLE ratings ( -- information related to the star ratings in the OPAC Link Here
3212
    PRIMARY KEY  (borrowernumber,biblionumber),
3212
    PRIMARY KEY  (borrowernumber,biblionumber),
3213
    CONSTRAINT ratings_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3213
    CONSTRAINT ratings_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3214
    CONSTRAINT ratings_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE
3214
    CONSTRAINT ratings_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE
3215
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3215
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3216
3216
3217
--
3217
--
3218
-- Table structure for table `quotes`
3218
-- Table structure for table `quotes`
Lines 3225-3231 CREATE TABLE `quotes` ( -- data for the quote of the day feature Link Here
3225
  `text` mediumtext NOT NULL, -- text of the quote
3225
  `text` mediumtext NOT NULL, -- text of the quote
3226
  `timestamp` datetime NOT NULL, -- date and time that the quote last appeared in the opac
3226
  `timestamp` datetime NOT NULL, -- date and time that the quote last appeared in the opac
3227
  PRIMARY KEY (`id`)
3227
  PRIMARY KEY (`id`)
3228
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3228
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3229
3229
3230
--
3230
--
3231
-- Table structure for table categories_branches
3231
-- Table structure for table categories_branches
Lines 3237-3243 CREATE TABLE categories_branches( -- association table between categories and br Link Here
3237
    branchcode VARCHAR(10),
3237
    branchcode VARCHAR(10),
3238
    FOREIGN KEY (categorycode) REFERENCES categories(categorycode) ON DELETE CASCADE,
3238
    FOREIGN KEY (categorycode) REFERENCES categories(categorycode) ON DELETE CASCADE,
3239
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3239
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3240
) ENGINE=INNODB DEFAULT CHARSET=utf8;
3240
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3241
3241
3242
--
3242
--
3243
-- Table structure for table authorised_values_branches
3243
-- Table structure for table authorised_values_branches
Lines 3249-3255 CREATE TABLE authorised_values_branches( -- association table between authorised Link Here
3249
    branchcode VARCHAR(10),
3249
    branchcode VARCHAR(10),
3250
    FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE,
3250
    FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE,
3251
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3251
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3252
) ENGINE=INNODB DEFAULT CHARSET=utf8;
3252
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3253
3253
3254
3254
3255
--
3255
--
Lines 3262-3268 CREATE TABLE borrower_attribute_types_branches( -- association table between bor Link Here
3262
    b_branchcode VARCHAR(10),
3262
    b_branchcode VARCHAR(10),
3263
    FOREIGN KEY (bat_code) REFERENCES borrower_attribute_types(code) ON DELETE CASCADE,
3263
    FOREIGN KEY (bat_code) REFERENCES borrower_attribute_types(code) ON DELETE CASCADE,
3264
    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3264
    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3265
) ENGINE=INNODB DEFAULT CHARSET=utf8;
3265
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3266
3266
3267
--
3267
--
3268
-- Table structure for table `borrower_modifications`
3268
-- Table structure for table `borrower_modifications`
Lines 3341-3347 CREATE TABLE IF NOT EXISTS `borrower_modifications` ( Link Here
3341
  PRIMARY KEY (`verification_token`,`borrowernumber`),
3341
  PRIMARY KEY (`verification_token`,`borrowernumber`),
3342
  KEY `verification_token` (`verification_token`),
3342
  KEY `verification_token` (`verification_token`),
3343
  KEY `borrowernumber` (`borrowernumber`)
3343
  KEY `borrowernumber` (`borrowernumber`)
3344
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3344
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3345
3345
3346
--
3346
--
3347
-- Table structure for table linktracker
3347
-- Table structure for table linktracker
Lines 3361-3367 CREATE TABLE linktracker ( Link Here
3361
   KEY itemidx (itemnumber),
3361
   KEY itemidx (itemnumber),
3362
   KEY borridx (borrowernumber),
3362
   KEY borridx (borrowernumber),
3363
   KEY dateidx (timeclicked)
3363
   KEY dateidx (timeclicked)
3364
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3364
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3365
3365
3366
--
3366
--
3367
-- Table structure for table 'plugin_data'
3367
-- Table structure for table 'plugin_data'
Lines 3372-3378 CREATE TABLE IF NOT EXISTS plugin_data ( Link Here
3372
  plugin_key varchar(255) NOT NULL,
3372
  plugin_key varchar(255) NOT NULL,
3373
  plugin_value text,
3373
  plugin_value text,
3374
  PRIMARY KEY (plugin_class,plugin_key)
3374
  PRIMARY KEY (plugin_class,plugin_key)
3375
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3375
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3376
3376
3377
--
3377
--
3378
-- Table structure for table `patron_lists`
3378
-- Table structure for table `patron_lists`
Lines 3385-3391 CREATE TABLE patron_lists ( Link Here
3385
  owner int(11) NOT NULL,                         -- borrowernumber of the list creator
3385
  owner int(11) NOT NULL,                         -- borrowernumber of the list creator
3386
  PRIMARY KEY (patron_list_id),
3386
  PRIMARY KEY (patron_list_id),
3387
  KEY owner (owner)
3387
  KEY owner (owner)
3388
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3388
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3389
3389
3390
--
3390
--
3391
-- Constraints for table `patron_lists`
3391
-- Constraints for table `patron_lists`
Lines 3405-3411 CREATE TABLE patron_list_patrons ( Link Here
3405
  PRIMARY KEY (patron_list_patron_id),
3405
  PRIMARY KEY (patron_list_patron_id),
3406
  KEY patron_list_id (patron_list_id),
3406
  KEY patron_list_id (patron_list_id),
3407
  KEY borrowernumber (borrowernumber)
3407
  KEY borrowernumber (borrowernumber)
3408
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3408
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3409
3409
3410
--
3410
--
3411
-- Constraints for table `patron_list_patrons`
3411
-- Constraints for table `patron_list_patrons`
Lines 3422-3428 CREATE TABLE IF NOT EXISTS marc_modification_templates ( Link Here
3422
    template_id int(11) NOT NULL AUTO_INCREMENT,
3422
    template_id int(11) NOT NULL AUTO_INCREMENT,
3423
    name text NOT NULL,
3423
    name text NOT NULL,
3424
    PRIMARY KEY (template_id)
3424
    PRIMARY KEY (template_id)
3425
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
3425
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3426
3426
3427
--
3427
--
3428
-- Table structure for table 'marc_modification_template_actions'
3428
-- Table structure for table 'marc_modification_template_actions'
Lines 3451-3457 CREATE TABLE IF NOT EXISTS marc_modification_template_actions ( Link Here
3451
  description text,
3451
  description text,
3452
  PRIMARY KEY (mmta_id),
3452
  PRIMARY KEY (mmta_id),
3453
  CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
3453
  CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
3454
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
3454
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3455
3455
3456
--
3456
--
3457
-- Table structure for table `misc_files`
3457
-- Table structure for table `misc_files`
Lines 3469-3475 CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec Link Here
3469
  PRIMARY KEY (`file_id`),
3469
  PRIMARY KEY (`file_id`),
3470
  KEY `table_tag` (`table_tag`),
3470
  KEY `table_tag` (`table_tag`),
3471
  KEY `record_id` (`record_id`)
3471
  KEY `record_id` (`record_id`)
3472
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3472
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3473
3473
3474
--
3474
--
3475
-- Table structure for table `columns_settings`
3475
-- Table structure for table `columns_settings`
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +13 lines)
Lines 9576-9581 if ( CheckVersion($DBversion) ) { Link Here
9576
$DBversion = "3.18.00.000";
9576
$DBversion = "3.18.00.000";
9577
if ( CheckVersion($DBversion) ) {
9577
if ( CheckVersion($DBversion) ) {
9578
    print "Upgrade to $DBversion done (3.18.0 release)\n";
9578
    print "Upgrade to $DBversion done (3.18.0 release)\n";
9579
    SetVersion($DBversion);
9580
}
9581
9582
$DBversion = "3.19.00.XXX";
9583
if ( CheckVersion($DBversion) ) {
9584
    $dbh->do(q|SET foreign_key_checks = 0|);;
9585
    my @tables = $dbh->tables();
9586
    for my $table ( @tables ) {
9587
        $dbh->do(qq|ALTER TABLE $table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci|);
9588
    }
9589
    $dbh->do(q|SET foreign_key_checks = 1|);;
9590
9591
    print "Upgrade to $DBversion done (Bug 11944 - Convert DB tables to utf8_unicode_ci)\n";
9579
    SetVersion ($DBversion);
9592
    SetVersion ($DBversion);
9580
}
9593
}
9581
9594
9582
- 

Return to bug 11944