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

(-)a/installer/data/mysql/kohastructure.sql (-232 / +231 lines)
Lines 8-14 Link Here
8
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
8
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
9
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
10
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
11
/*!40101 SET NAMES utf8 */;
11
/*!40101 SET NAMES utf8mb4 */;
12
/*!40103 SET TIME_ZONE='+00:00' */;
12
/*!40103 SET TIME_ZONE='+00:00' */;
13
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
13
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
14
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
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 COLLATE=utf8_unicode_ci;
35
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
36
36
37
--
37
--
38
-- Table structure for table `auth_types`
38
-- Table structure for table `auth_types`
Lines 45-51 CREATE TABLE `auth_types` ( Link Here
45
  `auth_tag_to_report` varchar(3) NOT NULL default '',
45
  `auth_tag_to_report` varchar(3) NOT NULL default '',
46
  `summary` mediumtext NOT NULL,
46
  `summary` mediumtext NOT NULL,
47
  PRIMARY KEY  (`authtypecode`)
47
  PRIMARY KEY  (`authtypecode`)
48
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
48
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
49
49
50
--
50
--
51
-- Table structure for table `auth_subfield_structure`
51
-- Table structure for table `auth_subfield_structure`
Lines 73-79 CREATE TABLE `auth_subfield_structure` ( Link Here
73
  PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
73
  PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
74
  KEY `tab` (`authtypecode`,`tab`),
74
  KEY `tab` (`authtypecode`,`tab`),
75
  CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
75
  CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
76
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
76
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
77
77
78
--
78
--
79
-- Table structure for table `auth_tag_structure`
79
-- Table structure for table `auth_tag_structure`
Lines 90-96 CREATE TABLE `auth_tag_structure` ( Link Here
90
  `authorised_value` varchar(10) default NULL,
90
  `authorised_value` varchar(10) default NULL,
91
  PRIMARY KEY  (`authtypecode`,`tagfield`),
91
  PRIMARY KEY  (`authtypecode`,`tagfield`),
92
  CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
92
  CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
93
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
93
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
94
94
95
95
96
--
96
--
Lines 99-107 CREATE TABLE `auth_tag_structure` ( Link Here
99
99
100
DROP TABLE IF EXISTS `authorised_value_categories`;
100
DROP TABLE IF EXISTS `authorised_value_categories`;
101
CREATE TABLE `authorised_value_categories` (
101
CREATE TABLE `authorised_value_categories` (
102
  `category_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
102
  `category_name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
103
  PRIMARY KEY (`category_name`)
103
  PRIMARY KEY (`category_name`)
104
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
104
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
105
105
106
--
106
--
107
-- Table structure for table `authorised_values`
107
-- Table structure for table `authorised_values`
Lines 117-126 CREATE TABLE `authorised_values` ( -- stores values for authorized values catego Link Here
117
  `imageurl` varchar(200) default NULL, -- authorized value URL
117
  `imageurl` varchar(200) default NULL, -- authorized value URL
118
  PRIMARY KEY  (`id`),
118
  PRIMARY KEY  (`id`),
119
  KEY `name` (`category`),
119
  KEY `name` (`category`),
120
  KEY `lib` (`lib`),
120
  KEY `lib` (`lib` (191)),
121
  KEY `auth_value_idx` (`authorised_value`),
121
  KEY `auth_value_idx` (`authorised_value`),
122
  CONSTRAINT `authorised_values_authorised_values_category` FOREIGN KEY (`category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE CASCADE ON UPDATE CASCADE
122
  CONSTRAINT `authorised_values_authorised_values_category` FOREIGN KEY (`category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE CASCADE ON UPDATE CASCADE
123
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
123
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
124
124
125
--
125
--
126
-- Table structure for table `biblio`
126
-- Table structure for table `biblio`
Lines 142-148 CREATE TABLE `biblio` ( -- table that stores bibliographic information Link Here
142
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
142
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
143
  PRIMARY KEY  (`biblionumber`),
143
  PRIMARY KEY  (`biblionumber`),
144
  KEY `blbnoidx` (`biblionumber`)
144
  KEY `blbnoidx` (`biblionumber`)
145
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
145
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
146
146
147
--
147
--
148
-- Table structure for table `biblio_framework`
148
-- Table structure for table `biblio_framework`
Lines 153-159 CREATE TABLE `biblio_framework` ( -- information about MARC frameworks Link Here
153
  `frameworkcode` varchar(4) NOT NULL default '', -- the unique code assigned to the framework
153
  `frameworkcode` varchar(4) NOT NULL default '', -- the unique code assigned to the framework
154
  `frameworktext` varchar(255) NOT NULL default '', -- the description/name given to the framework
154
  `frameworktext` varchar(255) NOT NULL default '', -- the description/name given to the framework
155
  PRIMARY KEY  (`frameworkcode`)
155
  PRIMARY KEY  (`frameworkcode`)
156
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
156
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
157
157
158
--
158
--
159
-- Table structure for table `biblioitems`
159
-- Table structure for table `biblioitems`
Lines 200-209 CREATE TABLE `biblioitems` ( -- information related to bibliographic records in Link Here
200
  KEY `isbn` (`isbn`(255)),
200
  KEY `isbn` (`isbn`(255)),
201
  KEY `issn` (`issn`(255)),
201
  KEY `issn` (`issn`(255)),
202
  KEY `ean` (`ean`(255)),
202
  KEY `ean` (`ean`(255)),
203
  KEY `publishercode` (`publishercode`),
203
  KEY `publishercode` (`publishercode` (191)),
204
  KEY `timestamp` (`timestamp`),
204
  KEY `timestamp` (`timestamp`),
205
  CONSTRAINT `biblioitems_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
205
  CONSTRAINT `biblioitems_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
206
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
206
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
207
207
208
--
208
--
209
-- Table structure for table `borrower_attribute_types`
209
-- Table structure for table `borrower_attribute_types`
Lines 224-230 CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field Link Here
224
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
224
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
225
  PRIMARY KEY  (`code`),
225
  PRIMARY KEY  (`code`),
226
  KEY `auth_val_cat_idx` (`authorised_value_category`)
226
  KEY `auth_val_cat_idx` (`authorised_value_category`)
227
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
227
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
228
228
229
--
229
--
230
-- Table structure for table `borrower_password_recovery`
230
-- Table structure for table `borrower_password_recovery`
Lines 237-243 CREATE TABLE IF NOT EXISTS `borrower_password_recovery` ( -- holds information a Link Here
237
  `valid_until` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- a time limit on the password recovery attempt
237
  `valid_until` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- a time limit on the password recovery attempt
238
  PRIMARY KEY (`borrowernumber`),
238
  PRIMARY KEY (`borrowernumber`),
239
  KEY borrowernumber (borrowernumber)
239
  KEY borrowernumber (borrowernumber)
240
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
240
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
241
241
242
--
242
--
243
-- Table structure for table `branchcategories`
243
-- Table structure for table `branchcategories`
Lines 252-258 CREATE TABLE `branchcategories` ( -- information related to library/branch group Link Here
252
  `show_in_pulldown` tinyint(1) NOT NULL DEFAULT '0', -- says this group should be in the opac libararies pulldown if it is enabled
252
  `show_in_pulldown` tinyint(1) NOT NULL DEFAULT '0', -- says this group should be in the opac libararies pulldown if it is enabled
253
  PRIMARY KEY  (`categorycode`),
253
  PRIMARY KEY  (`categorycode`),
254
  KEY `show_in_pulldown` (`show_in_pulldown`)
254
  KEY `show_in_pulldown` (`show_in_pulldown`)
255
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
255
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
256
256
257
--
257
--
258
-- Table structure for table `branches`
258
-- Table structure for table `branches`
Lines 283-289 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
283
  `geolocation` VARCHAR(255) default NULL, -- geolocation of your library
283
  `geolocation` VARCHAR(255) default NULL, -- geolocation of your library
284
  `marcorgcode` VARCHAR(16) default NULL, -- MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode
284
  `marcorgcode` VARCHAR(16) default NULL, -- MARC Organization Code, see http://www.loc.gov/marc/organizations/orgshome.html, when empty defaults to syspref MARCOrgCode
285
  PRIMARY KEY (`branchcode`)
285
  PRIMARY KEY (`branchcode`)
286
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
286
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
287
287
288
--
288
--
289
-- Table structure for table `branchrelations`
289
-- Table structure for table `branchrelations`
Lines 298-304 CREATE TABLE `branchrelations` ( -- this table links libraries/branches to group Link Here
298
  KEY `categorycode` (`categorycode`),
298
  KEY `categorycode` (`categorycode`),
299
  CONSTRAINT `branchrelations_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
299
  CONSTRAINT `branchrelations_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
300
  CONSTRAINT `branchrelations_ibfk_2` FOREIGN KEY (`categorycode`) REFERENCES `branchcategories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
300
  CONSTRAINT `branchrelations_ibfk_2` FOREIGN KEY (`categorycode`) REFERENCES `branchcategories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
301
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
301
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
302
302
303
--
303
--
304
-- Table structure for table `browser`
304
-- Table structure for table `browser`
Lines 310-316 CREATE TABLE `browser` ( Link Here
310
  `description` varchar(255) NOT NULL,
310
  `description` varchar(255) NOT NULL,
311
  `number` bigint(20) NOT NULL,
311
  `number` bigint(20) NOT NULL,
312
  `endnode` tinyint(4) NOT NULL
312
  `endnode` tinyint(4) NOT NULL
313
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
313
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
314
314
315
--
315
--
316
-- Table structure for table `categories`
316
-- Table structure for table `categories`
Lines 337-343 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
337
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
337
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
338
  PRIMARY KEY  (`categorycode`),
338
  PRIMARY KEY  (`categorycode`),
339
  UNIQUE KEY `categorycode` (`categorycode`)
339
  UNIQUE KEY `categorycode` (`categorycode`)
340
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
340
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
341
341
342
--
342
--
343
-- Table: collections
343
-- Table: collections
Lines 349-355 CREATE TABLE collections ( Link Here
349
  colDesc text NOT NULL,
349
  colDesc text NOT NULL,
350
  colBranchcode varchar(10) DEFAULT NULL, -- 'branchcode for branch where item should be held.'
350
  colBranchcode varchar(10) DEFAULT NULL, -- 'branchcode for branch where item should be held.'
351
  PRIMARY KEY (colId)
351
  PRIMARY KEY (colId)
352
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
352
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
353
353
354
--
354
--
355
-- Constraints for table `collections`
355
-- Constraints for table `collections`
Lines 367-373 CREATE TABLE collections_tracking ( Link Here
367
  colId integer(11) NOT NULL DEFAULT 0 comment 'collections.colId',
367
  colId integer(11) NOT NULL DEFAULT 0 comment 'collections.colId',
368
  itemnumber integer(11) NOT NULL DEFAULT 0 comment 'items.itemnumber',
368
  itemnumber integer(11) NOT NULL DEFAULT 0 comment 'items.itemnumber',
369
  PRIMARY KEY (collections_tracking_id)
369
  PRIMARY KEY (collections_tracking_id)
370
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
370
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
371
371
372
--
372
--
373
-- Table structure for table `branch_borrower_circ_rules`
373
-- Table structure for table `branch_borrower_circ_rules`
Lines 384-390 CREATE TABLE `branch_borrower_circ_rules` ( -- includes default circulation rule Link Here
384
    ON DELETE CASCADE ON UPDATE CASCADE,
384
    ON DELETE CASCADE ON UPDATE CASCADE,
385
  CONSTRAINT `branch_borrower_circ_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
385
  CONSTRAINT `branch_borrower_circ_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
386
    ON DELETE CASCADE ON UPDATE CASCADE
386
    ON DELETE CASCADE ON UPDATE CASCADE
387
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
387
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
388
388
389
--
389
--
390
-- Table structure for table `default_borrower_circ_rules`
390
-- Table structure for table `default_borrower_circ_rules`
Lines 398-404 CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found und Link Here
398
  PRIMARY KEY (`categorycode`),
398
  PRIMARY KEY (`categorycode`),
399
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
399
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
400
    ON DELETE CASCADE ON UPDATE CASCADE
400
    ON DELETE CASCADE ON UPDATE CASCADE
401
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
401
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
402
402
403
--
403
--
404
-- Table structure for table `default_branch_circ_rules`
404
-- Table structure for table `default_branch_circ_rules`
Lines 415-421 CREATE TABLE `default_branch_circ_rules` ( Link Here
415
  PRIMARY KEY (`branchcode`),
415
  PRIMARY KEY (`branchcode`),
416
  CONSTRAINT `default_branch_circ_rules_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
416
  CONSTRAINT `default_branch_circ_rules_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
417
    ON DELETE CASCADE ON UPDATE CASCADE
417
    ON DELETE CASCADE ON UPDATE CASCADE
418
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
418
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
419
419
420
--
420
--
421
-- Table structure for table `default_circ_rules`
421
-- Table structure for table `default_circ_rules`
Lines 430-436 CREATE TABLE `default_circ_rules` ( Link Here
430
    hold_fulfillment_policy ENUM('any', 'homebranch', 'holdingbranch') NOT NULL DEFAULT 'any', -- limit trapping of holds by branchcode
430
    hold_fulfillment_policy ENUM('any', 'homebranch', 'holdingbranch') NOT NULL DEFAULT 'any', -- limit trapping of holds by branchcode
431
    `returnbranch` varchar(15) default NULL,
431
    `returnbranch` varchar(15) default NULL,
432
    PRIMARY KEY (`singleton`)
432
    PRIMARY KEY (`singleton`)
433
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
433
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
434
434
435
--
435
--
436
-- Table structure for table `cities`
436
-- Table structure for table `cities`
Lines 444-450 CREATE TABLE `cities` ( -- authorized values for cities/states/countries to choo Link Here
444
  `city_country` VARCHAR( 100 ) NULL DEFAULT NULL, -- name of the country
444
  `city_country` VARCHAR( 100 ) NULL DEFAULT NULL, -- name of the country
445
  `city_zipcode` varchar(20) default NULL, -- zip or postal code
445
  `city_zipcode` varchar(20) default NULL, -- zip or postal code
446
  PRIMARY KEY  (`cityid`)
446
  PRIMARY KEY  (`cityid`)
447
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
447
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
448
448
449
--
449
--
450
-- Table structure for table `class_sort_rules`
450
-- Table structure for table `class_sort_rules`
Lines 457-463 CREATE TABLE `class_sort_rules` ( Link Here
457
  `sort_routine` varchar(30) NOT NULL default '',
457
  `sort_routine` varchar(30) NOT NULL default '',
458
  PRIMARY KEY (`class_sort_rule`),
458
  PRIMARY KEY (`class_sort_rule`),
459
  UNIQUE KEY `class_sort_rule_idx` (`class_sort_rule`)
459
  UNIQUE KEY `class_sort_rule_idx` (`class_sort_rule`)
460
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
460
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
461
461
462
--
462
--
463
-- Table structure for table `class_sources`
463
-- Table structure for table `class_sources`
Lines 473-479 CREATE TABLE `class_sources` ( Link Here
473
  UNIQUE KEY `cn_source_idx` (`cn_source`),
473
  UNIQUE KEY `cn_source_idx` (`cn_source`),
474
  KEY `used_idx` (`used`),
474
  KEY `used_idx` (`used`),
475
  CONSTRAINT `class_source_ibfk_1` FOREIGN KEY (`class_sort_rule`) REFERENCES `class_sort_rules` (`class_sort_rule`)
475
  CONSTRAINT `class_source_ibfk_1` FOREIGN KEY (`class_sort_rule`) REFERENCES `class_sort_rules` (`class_sort_rule`)
476
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
476
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
477
477
478
--
478
--
479
-- Table structure for table `currency`
479
-- Table structure for table `currency`
Lines 489-495 CREATE TABLE `currency` ( Link Here
489
  `active` tinyint(1) default NULL,
489
  `active` tinyint(1) default NULL,
490
  `archived` tinyint(1) DEFAULT 0,
490
  `archived` tinyint(1) DEFAULT 0,
491
  PRIMARY KEY  (`currency`)
491
  PRIMARY KEY  (`currency`)
492
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
492
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
493
493
494
--
494
--
495
-- Table structure for table `deletedbiblio`
495
-- Table structure for table `deletedbiblio`
Lines 511-517 CREATE TABLE `deletedbiblio` ( -- stores information about bibliographic records Link Here
511
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
511
  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
512
  PRIMARY KEY  (`biblionumber`),
512
  PRIMARY KEY  (`biblionumber`),
513
  KEY `blbnoidx` (`biblionumber`)
513
  KEY `blbnoidx` (`biblionumber`)
514
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
514
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
515
515
516
--
516
--
517
-- Table structure for table `deletedbiblioitems`
517
-- Table structure for table `deletedbiblioitems`
Lines 557-565 CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records t Link Here
557
  KEY `itemtype_idx` (`itemtype`),
557
  KEY `itemtype_idx` (`itemtype`),
558
  KEY `isbn` (`isbn`(255)),
558
  KEY `isbn` (`isbn`(255)),
559
  KEY `ean` (`ean`(255)),
559
  KEY `ean` (`ean`(255)),
560
  KEY `publishercode` (`publishercode`),
560
  KEY `publishercode` (`publishercode` (191)),
561
  KEY `timestamp` (`timestamp`)
561
  KEY `timestamp` (`timestamp`)
562
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
562
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
563
563
564
--
564
--
565
-- Table structure for table `deletedborrowers`
565
-- Table structure for table `deletedborrowers`
Lines 644-650 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
644
  KEY borrowernumber (borrowernumber),
644
  KEY borrowernumber (borrowernumber),
645
  KEY `cardnumber` (`cardnumber`),
645
  KEY `cardnumber` (`cardnumber`),
646
  KEY `sms_provider_id` (`sms_provider_id`)
646
  KEY `sms_provider_id` (`sms_provider_id`)
647
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
647
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
648
648
649
--
649
--
650
-- Table structure for table `deleteditems`
650
-- Table structure for table `deleteditems`
Lines 705-711 CREATE TABLE `deleteditems` ( Link Here
705
  KEY `delholdingbranch` (`holdingbranch`),
705
  KEY `delholdingbranch` (`holdingbranch`),
706
  KEY `itype_idx` (`itype`),
706
  KEY `itype_idx` (`itype`),
707
  KEY `timestamp` (`timestamp`)
707
  KEY `timestamp` (`timestamp`)
708
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
708
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
709
709
710
--
710
--
711
-- Table structure for table `export_format`
711
-- Table structure for table `export_format`
Lines 724-730 CREATE TABLE `export_format` ( Link Here
724
  `type` varchar(255) DEFAULT 'marc',
724
  `type` varchar(255) DEFAULT 'marc',
725
  `used_for` varchar(255) DEFAULT 'export_records',
725
  `used_for` varchar(255) DEFAULT 'export_records',
726
  PRIMARY KEY  (`export_format_id`)
726
  PRIMARY KEY  (`export_format_id`)
727
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Used for CSV export';
727
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Used for CSV export';
728
728
729
--
729
--
730
-- Table structure for table `import_batches`
730
-- Table structure for table `import_batches`
Lines 749-755 CREATE TABLE `import_batches` ( -- information about batches of marc records tha Link Here
749
  `comments` mediumtext, -- any comments added when the file was uploaded
749
  `comments` mediumtext, -- any comments added when the file was uploaded
750
  PRIMARY KEY (`import_batch_id`),
750
  PRIMARY KEY (`import_batch_id`),
751
  KEY `branchcode` (`branchcode`)
751
  KEY `branchcode` (`branchcode`)
752
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
752
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
753
753
754
--
754
--
755
-- Table structure for table `import_records`
755
-- Table structure for table `import_records`
Lines 778-784 CREATE TABLE `import_records` ( Link Here
778
  KEY `branchcode` (`branchcode`),
778
  KEY `branchcode` (`branchcode`),
779
  KEY `batch_sequence` (`import_batch_id`, `record_sequence`),
779
  KEY `batch_sequence` (`import_batch_id`, `record_sequence`),
780
  KEY `batch_id_record_type` (`import_batch_id`,`record_type`)
780
  KEY `batch_id_record_type` (`import_batch_id`,`record_type`)
781
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
781
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
782
782
783
--
783
--
784
-- Table structure for `import_record_matches`
784
-- Table structure for `import_record_matches`
Lines 791-797 CREATE TABLE `import_record_matches` ( -- matches found when importing a batch o Link Here
791
  CONSTRAINT `import_record_matches_ibfk_1` FOREIGN KEY (`import_record_id`)
791
  CONSTRAINT `import_record_matches_ibfk_1` FOREIGN KEY (`import_record_id`)
792
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
792
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
793
  KEY `record_score` (`import_record_id`, `score`)
793
  KEY `record_score` (`import_record_id`, `score`)
794
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
794
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
795
795
796
--
796
--
797
-- Table structure for table `import_auths`
797
-- Table structure for table `import_auths`
Lines 807-813 CREATE TABLE `import_auths` ( Link Here
807
  CONSTRAINT `import_auths_ibfk_1` FOREIGN KEY (`import_record_id`)
807
  CONSTRAINT `import_auths_ibfk_1` FOREIGN KEY (`import_record_id`)
808
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
808
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
809
  KEY `matched_authid` (`matched_authid`)
809
  KEY `matched_authid` (`matched_authid`)
810
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
810
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
811
811
812
--
812
--
813
-- Table structure for table `import_biblios`
813
-- Table structure for table `import_biblios`
Lines 829-835 CREATE TABLE `import_biblios` ( Link Here
829
  KEY `matched_biblionumber` (`matched_biblionumber`),
829
  KEY `matched_biblionumber` (`matched_biblionumber`),
830
  KEY `title` (`title`),
830
  KEY `title` (`title`),
831
  KEY `isbn` (`isbn`)
831
  KEY `isbn` (`isbn`)
832
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
832
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
833
833
834
--
834
--
835
-- Table structure for table `import_items`
835
-- Table structure for table `import_items`
Lines 849-855 CREATE TABLE `import_items` ( Link Here
849
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
849
             REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE,
850
  KEY `itemnumber` (`itemnumber`),
850
  KEY `itemnumber` (`itemnumber`),
851
  KEY `branchcode` (`branchcode`)
851
  KEY `branchcode` (`branchcode`)
852
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
852
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
853
853
854
--
854
--
855
-- Table structure for table `issuingrules`
855
-- Table structure for table `issuingrules`
Lines 893-899 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
893
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
893
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
894
  KEY `categorycode` (`categorycode`),
894
  KEY `categorycode` (`categorycode`),
895
  KEY `itemtype` (`itemtype`)
895
  KEY `itemtype` (`itemtype`)
896
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
896
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
897
897
898
--
898
--
899
-- Table structure for table `refund_lost_item_fee_rules`
899
-- Table structure for table `refund_lost_item_fee_rules`
Lines 904-910 CREATE TABLE `refund_lost_item_fee_rules` ( -- refund lost item fee rules tbale Link Here
904
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
904
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
905
  `refund` tinyint(1) NOT NULL default 0, -- control wether to refund lost item fees on return
905
  `refund` tinyint(1) NOT NULL default 0, -- control wether to refund lost item fees on return
906
  PRIMARY KEY  (`branchcode`)
906
  PRIMARY KEY  (`branchcode`)
907
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
907
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
908
908
909
--
909
--
910
-- Table structure for table `items`
910
-- Table structure for table `items`
Lines 963-969 CREATE TABLE `items` ( -- holdings/item information Link Here
963
  KEY `itembibnoidx` (`biblionumber`),
963
  KEY `itembibnoidx` (`biblionumber`),
964
  KEY `homebranch` (`homebranch`),
964
  KEY `homebranch` (`homebranch`),
965
  KEY `holdingbranch` (`holdingbranch`),
965
  KEY `holdingbranch` (`holdingbranch`),
966
  KEY `itemcallnumber` (`itemcallnumber`),
966
  KEY `itemcallnumber` (`itemcallnumber` (191)),
967
  KEY `items_location` (`location`),
967
  KEY `items_location` (`location`),
968
  KEY `items_ccode` (`ccode`),
968
  KEY `items_ccode` (`ccode`),
969
  KEY `itype_idx` (`itype`),
969
  KEY `itype_idx` (`itype`),
Lines 972-978 CREATE TABLE `items` ( -- holdings/item information Link Here
972
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
972
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
973
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
973
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
974
  CONSTRAINT `items_ibfk_4` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
974
  CONSTRAINT `items_ibfk_4` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
975
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
975
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
976
976
977
--
977
--
978
-- Table structure for table `itemtypes`
978
-- Table structure for table `itemtypes`
Lines 995-1001 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
995
  searchcategory varchar(80) default NULL, -- Group this item type with others with the same value on OPAC search options
995
  searchcategory varchar(80) default NULL, -- Group this item type with others with the same value on OPAC search options
996
  PRIMARY KEY  (`itemtype`),
996
  PRIMARY KEY  (`itemtype`),
997
  UNIQUE KEY `itemtype` (`itemtype`)
997
  UNIQUE KEY `itemtype` (`itemtype`)
998
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
998
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
999
999
1000
--
1000
--
1001
-- Table structure for table `default_branch_item_rules`
1001
-- Table structure for table `default_branch_item_rules`
Lines 1010-1016 CREATE TABLE `default_branch_item_rules` ( Link Here
1010
  PRIMARY KEY  (`itemtype`),
1010
  PRIMARY KEY  (`itemtype`),
1011
  CONSTRAINT `default_branch_item_rules_ibfk_1` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
1011
  CONSTRAINT `default_branch_item_rules_ibfk_1` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
1012
    ON DELETE CASCADE ON UPDATE CASCADE
1012
    ON DELETE CASCADE ON UPDATE CASCADE
1013
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1013
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1014
1014
1015
--
1015
--
1016
-- Table structure for table `branchtransfers`
1016
-- Table structure for table `branchtransfers`
Lines 1032-1038 CREATE TABLE `branchtransfers` ( -- information for items that are in transit be Link Here
1032
  CONSTRAINT `branchtransfers_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1032
  CONSTRAINT `branchtransfers_ibfk_1` FOREIGN KEY (`frombranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1033
  CONSTRAINT `branchtransfers_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1033
  CONSTRAINT `branchtransfers_ibfk_2` FOREIGN KEY (`tobranch`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1034
  CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
1034
  CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
1035
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1035
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1036
1036
1037
--
1037
--
1038
-- Table structure for table `branch_item_rules`
1038
-- Table structure for table `branch_item_rules`
Lines 1051-1057 CREATE TABLE `branch_item_rules` ( -- information entered in the circulation and Link Here
1051
    ON DELETE CASCADE ON UPDATE CASCADE,
1051
    ON DELETE CASCADE ON UPDATE CASCADE,
1052
  CONSTRAINT `branch_item_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
1052
  CONSTRAINT `branch_item_rules_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
1053
    ON DELETE CASCADE ON UPDATE CASCADE
1053
    ON DELETE CASCADE ON UPDATE CASCADE
1054
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1054
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1055
1055
1056
--
1056
--
1057
-- Table structure for table `creator_images`
1057
-- Table structure for table `creator_images`
Lines 1066-1072 CREATE TABLE `creator_images` ( Link Here
1066
  `image_name` char(20) NOT NULL DEFAULT 'DEFAULT',
1066
  `image_name` char(20) NOT NULL DEFAULT 'DEFAULT',
1067
  PRIMARY KEY (`image_id`),
1067
  PRIMARY KEY (`image_id`),
1068
  UNIQUE KEY `image_name_index` (`image_name`)
1068
  UNIQUE KEY `image_name_index` (`image_name`)
1069
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1069
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1070
1070
1071
--
1071
--
1072
-- Table structure for table `creator_layouts`
1072
-- Table structure for table `creator_layouts`
Lines 1083-1098 CREATE TABLE `creator_layouts` ( Link Here
1083
  `layout_name` char(25) NOT NULL DEFAULT 'DEFAULT',
1083
  `layout_name` char(25) NOT NULL DEFAULT 'DEFAULT',
1084
  `guidebox` int(1) DEFAULT '0',
1084
  `guidebox` int(1) DEFAULT '0',
1085
  `oblique_title` int(1) DEFAULT '1',
1085
  `oblique_title` int(1) DEFAULT '1',
1086
  `font` char(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'TR',
1086
  `font` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'TR',
1087
  `font_size` int(4) NOT NULL DEFAULT '10',
1087
  `font_size` int(4) NOT NULL DEFAULT '10',
1088
  `units` char(20) NOT NULL DEFAULT 'POINT',
1088
  `units` char(20) NOT NULL DEFAULT 'POINT',
1089
  `callnum_split` int(1) DEFAULT '0',
1089
  `callnum_split` int(1) DEFAULT '0',
1090
  `text_justify` char(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'L',
1090
  `text_justify` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'L',
1091
  `format_string` varchar(210) NOT NULL DEFAULT 'barcode',
1091
  `format_string` varchar(210) NOT NULL DEFAULT 'barcode',
1092
  `layout_xml` text NOT NULL,
1092
  `layout_xml` text NOT NULL,
1093
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1093
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1094
  PRIMARY KEY (`layout_id`)
1094
  PRIMARY KEY (`layout_id`)
1095
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1095
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1096
1096
1097
--
1097
--
1098
-- Table structure for table `creator_templates`
1098
-- Table structure for table `creator_templates`
Lines 1122-1128 CREATE TABLE `creator_templates` ( Link Here
1122
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1122
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1123
  PRIMARY KEY (`template_id`),
1123
  PRIMARY KEY (`template_id`),
1124
  KEY `template_profile_fk_constraint` (`profile_id`)
1124
  KEY `template_profile_fk_constraint` (`profile_id`)
1125
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1125
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1126
1126
1127
--
1127
--
1128
-- Table structure for table `marc_subfield_structure`
1128
-- Table structure for table `marc_subfield_structure`
Lines 1153-1159 CREATE TABLE `marc_subfield_structure` ( Link Here
1153
  KEY `tab` (`frameworkcode`,`tab`),
1153
  KEY `tab` (`frameworkcode`,`tab`),
1154
  KEY `kohafield` (`frameworkcode`,`kohafield`),
1154
  KEY `kohafield` (`frameworkcode`,`kohafield`),
1155
  CONSTRAINT `marc_subfield_structure_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE
1155
  CONSTRAINT `marc_subfield_structure_ibfk_1` FOREIGN KEY (`authorised_value`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE
1156
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1156
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1157
1157
1158
--
1158
--
1159
-- Table structure for table `marc_tag_structure`
1159
-- Table structure for table `marc_tag_structure`
Lines 1169-1175 CREATE TABLE `marc_tag_structure` ( Link Here
1169
  `authorised_value` varchar(10) default NULL,
1169
  `authorised_value` varchar(10) default NULL,
1170
  `frameworkcode` varchar(4) NOT NULL default '',
1170
  `frameworkcode` varchar(4) NOT NULL default '',
1171
  PRIMARY KEY  (`frameworkcode`,`tagfield`)
1171
  PRIMARY KEY  (`frameworkcode`,`tagfield`)
1172
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1172
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1173
1173
1174
--
1174
--
1175
-- Table structure for table `marc_matchers`
1175
-- Table structure for table `marc_matchers`
Lines 1185-1191 CREATE TABLE `marc_matchers` ( Link Here
1185
  PRIMARY KEY (`matcher_id`),
1185
  PRIMARY KEY (`matcher_id`),
1186
  KEY `code` (`code`),
1186
  KEY `code` (`code`),
1187
  KEY `record_type` (`record_type`)
1187
  KEY `record_type` (`record_type`)
1188
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1188
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1189
1189
1190
--
1190
--
1191
-- Table structure for table `matchpoints`
1191
-- Table structure for table `matchpoints`
Lines 1199-1205 CREATE TABLE `matchpoints` ( Link Here
1199
  PRIMARY KEY (`matchpoint_id`),
1199
  PRIMARY KEY (`matchpoint_id`),
1200
  CONSTRAINT `matchpoints_ifbk_1` FOREIGN KEY (`matcher_id`)
1200
  CONSTRAINT `matchpoints_ifbk_1` FOREIGN KEY (`matcher_id`)
1201
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE
1201
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE
1202
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1202
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1203
1203
1204
1204
1205
--
1205
--
Lines 1218-1224 CREATE TABLE `matchpoint_components` ( Link Here
1218
  KEY `by_sequence` (`matchpoint_id`, `sequence`),
1218
  KEY `by_sequence` (`matchpoint_id`, `sequence`),
1219
  CONSTRAINT `matchpoint_components_ifbk_1` FOREIGN KEY (`matchpoint_id`)
1219
  CONSTRAINT `matchpoint_components_ifbk_1` FOREIGN KEY (`matchpoint_id`)
1220
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1220
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1221
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1221
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1222
1222
1223
--
1223
--
1224
-- Table structure for table `matcher_component_norms`
1224
-- Table structure for table `matcher_component_norms`
Lines 1231-1237 CREATE TABLE `matchpoint_component_norms` ( Link Here
1231
  KEY `matchpoint_component_norms` (`matchpoint_component_id`, `sequence`),
1231
  KEY `matchpoint_component_norms` (`matchpoint_component_id`, `sequence`),
1232
  CONSTRAINT `matchpoint_component_norms_ifbk_1` FOREIGN KEY (`matchpoint_component_id`)
1232
  CONSTRAINT `matchpoint_component_norms_ifbk_1` FOREIGN KEY (`matchpoint_component_id`)
1233
  REFERENCES `matchpoint_components` (`matchpoint_component_id`) ON DELETE CASCADE ON UPDATE CASCADE
1233
  REFERENCES `matchpoint_components` (`matchpoint_component_id`) ON DELETE CASCADE ON UPDATE CASCADE
1234
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1234
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1235
1235
1236
--
1236
--
1237
-- Table structure for table `matcher_matchpoints`
1237
-- Table structure for table `matcher_matchpoints`
Lines 1244-1250 CREATE TABLE `matcher_matchpoints` ( Link Here
1244
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1244
  REFERENCES `marc_matchers` (`matcher_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1245
  CONSTRAINT `matcher_matchpoints_ifbk_2` FOREIGN KEY (`matchpoint_id`)
1245
  CONSTRAINT `matcher_matchpoints_ifbk_2` FOREIGN KEY (`matchpoint_id`)
1246
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1246
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1247
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1247
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1248
1248
1249
--
1249
--
1250
-- Table structure for table `matchchecks`
1250
-- Table structure for table `matchchecks`
Lines 1262-1268 CREATE TABLE `matchchecks` ( Link Here
1262
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1262
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE,
1263
  CONSTRAINT `matcher_matchchecks_ifbk_3` FOREIGN KEY (`target_matchpoint_id`)
1263
  CONSTRAINT `matcher_matchchecks_ifbk_3` FOREIGN KEY (`target_matchpoint_id`)
1264
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1264
  REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
1265
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1265
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1266
1266
1267
--
1267
--
1268
-- Table structure for table `need_merge_authorities`
1268
-- Table structure for table `need_merge_authorities`
Lines 1278-1284 CREATE TABLE `need_merge_authorities` ( -- keeping track of authority records st Link Here
1278
  `done` tinyint DEFAULT 0  -- indication whether merge has been executed (0=not done, 1=done, 2=in progress)
1278
  `done` tinyint DEFAULT 0  -- indication whether merge has been executed (0=not done, 1=done, 2=in progress)
1279
-- Note: authid and authid_new should NOT be FOREIGN keys !
1279
-- Note: authid and authid_new should NOT be FOREIGN keys !
1280
-- authid may have been deleted; authid_new may be zero
1280
-- authid may have been deleted; authid_new may be zero
1281
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1281
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1282
1282
1283
--
1283
--
1284
-- Table structure for table `oai_sets`
1284
-- Table structure for table `oai_sets`
Lines 1290-1296 CREATE TABLE `oai_sets` ( Link Here
1290
  `spec` varchar(80) NOT NULL UNIQUE,
1290
  `spec` varchar(80) NOT NULL UNIQUE,
1291
  `name` varchar(80) NOT NULL,
1291
  `name` varchar(80) NOT NULL,
1292
  PRIMARY KEY (`id`)
1292
  PRIMARY KEY (`id`)
1293
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1293
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1294
1294
1295
--
1295
--
1296
-- Table structure for table `oai_sets_descriptions`
1296
-- Table structure for table `oai_sets_descriptions`
Lines 1301-1307 CREATE TABLE `oai_sets_descriptions` ( Link Here
1301
  `set_id` int(11) NOT NULL,
1301
  `set_id` int(11) NOT NULL,
1302
  `description` varchar(255) NOT NULL,
1302
  `description` varchar(255) NOT NULL,
1303
  CONSTRAINT `oai_sets_descriptions_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1303
  CONSTRAINT `oai_sets_descriptions_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1304
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1304
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1305
1305
1306
--
1306
--
1307
-- Table structure for table `oai_sets_mappings`
1307
-- Table structure for table `oai_sets_mappings`
Lines 1315-1321 CREATE TABLE `oai_sets_mappings` ( Link Here
1315
  `operator` varchar(8) NOT NULL default 'equal',
1315
  `operator` varchar(8) NOT NULL default 'equal',
1316
  `marcvalue` varchar(80) NOT NULL,
1316
  `marcvalue` varchar(80) NOT NULL,
1317
  CONSTRAINT `oai_sets_mappings_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1317
  CONSTRAINT `oai_sets_mappings_ibfk_1` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1318
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1318
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1319
1319
1320
--
1320
--
1321
-- Table structure for table `oai_sets_biblios`
1321
-- Table structure for table `oai_sets_biblios`
Lines 1327-1333 CREATE TABLE `oai_sets_biblios` ( Link Here
1327
  `set_id` int(11) NOT NULL,
1327
  `set_id` int(11) NOT NULL,
1328
  PRIMARY KEY (`biblionumber`, `set_id`),
1328
  PRIMARY KEY (`biblionumber`, `set_id`),
1329
  CONSTRAINT `oai_sets_biblios_ibfk_2` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1329
  CONSTRAINT `oai_sets_biblios_ibfk_2` FOREIGN KEY (`set_id`) REFERENCES `oai_sets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1330
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1330
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1331
1331
1332
--
1332
--
1333
-- Table structure for table `overduerules`
1333
-- Table structure for table `overduerules`
Lines 1349-1355 CREATE TABLE `overduerules` ( -- overdue notice status and triggers Link Here
1349
  `debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no)
1349
  `debarred3` int(1) default 0, -- is the patron restricted when the third notice is sent (1 for yes, 0 for no)
1350
  PRIMARY KEY  (`overduerules_id`),
1350
  PRIMARY KEY  (`overduerules_id`),
1351
  UNIQUE KEY `overduerules_branch_cat` (`branchcode`,`categorycode`)
1351
  UNIQUE KEY `overduerules_branch_cat` (`branchcode`,`categorycode`)
1352
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1352
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1353
1353
1354
-- Table structure for table `pending_offline_operations`
1354
-- Table structure for table `pending_offline_operations`
1355
--
1355
--
Lines 1367-1373 CREATE TABLE pending_offline_operations ( Link Here
1367
  cardnumber varchar(32) DEFAULT NULL,
1367
  cardnumber varchar(32) DEFAULT NULL,
1368
  amount decimal(28,6) DEFAULT NULL,
1368
  amount decimal(28,6) DEFAULT NULL,
1369
  PRIMARY KEY (operationid)
1369
  PRIMARY KEY (operationid)
1370
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1370
) ENGINE=MyISAM  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1371
1371
1372
1372
1373
--
1373
--
Lines 1380-1386 CREATE TABLE `printers` ( Link Here
1380
  `printqueue` varchar(20) default NULL,
1380
  `printqueue` varchar(20) default NULL,
1381
  `printtype` varchar(20) default NULL,
1381
  `printtype` varchar(20) default NULL,
1382
  PRIMARY KEY  (`printername`)
1382
  PRIMARY KEY  (`printername`)
1383
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1383
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1384
1384
1385
--
1385
--
1386
-- Table structure for table `printers_profile`
1386
-- Table structure for table `printers_profile`
Lines 1400-1406 CREATE TABLE `printers_profile` ( Link Here
1400
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1400
  `creator` char(15) NOT NULL DEFAULT 'Labels',
1401
  PRIMARY KEY  (`profile_id`),
1401
  PRIMARY KEY  (`profile_id`),
1402
  UNIQUE KEY `printername` (`printer_name`,`template_id`,`paper_bin`,`creator`)
1402
  UNIQUE KEY `printername` (`printer_name`,`template_id`,`paper_bin`,`creator`)
1403
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1403
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1404
1404
1405
--
1405
--
1406
-- Table structure for table `repeatable_holidays`
1406
-- Table structure for table `repeatable_holidays`
Lines 1416-1422 CREATE TABLE `repeatable_holidays` ( -- information for the days the library is Link Here
1416
  `title` varchar(50) NOT NULL default '', -- title of this closing
1416
  `title` varchar(50) NOT NULL default '', -- title of this closing
1417
  `description` text NOT NULL, -- description for this closing
1417
  `description` text NOT NULL, -- description for this closing
1418
  PRIMARY KEY  (`id`)
1418
  PRIMARY KEY  (`id`)
1419
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1419
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1420
1420
1421
--
1421
--
1422
-- Table structure for table `reports_dictionary`
1422
-- Table structure for table `reports_dictionary`
Lines 1433-1439 CREATE TABLE reports_dictionary ( -- definitions (or snippets of SQL) stored for Link Here
1433
   report_area varchar(6) DEFAULT NULL, -- Koha module this definition is for Circulation, Catalog, Patrons, Acquistions, Accounts)
1433
   report_area varchar(6) DEFAULT NULL, -- Koha module this definition is for Circulation, Catalog, Patrons, Acquistions, Accounts)
1434
   PRIMARY KEY  (id),
1434
   PRIMARY KEY  (id),
1435
   KEY dictionary_area_idx (report_area)
1435
   KEY dictionary_area_idx (report_area)
1436
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1436
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1437
1437
1438
--
1438
--
1439
-- Table structure for table `saved_sql`
1439
-- Table structure for table `saved_sql`
Lines 1458-1464 CREATE TABLE saved_sql ( -- saved sql reports Link Here
1458
   PRIMARY KEY  (`id`),
1458
   PRIMARY KEY  (`id`),
1459
   KEY sql_area_group_idx (report_group, report_subgroup),
1459
   KEY sql_area_group_idx (report_group, report_subgroup),
1460
   KEY boridx (`borrowernumber`)
1460
   KEY boridx (`borrowernumber`)
1461
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1461
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1462
1462
1463
1463
1464
--
1464
--
Lines 1472-1478 CREATE TABLE saved_reports ( Link Here
1472
   `report` longtext,
1472
   `report` longtext,
1473
   `date_run` datetime default NULL,
1473
   `date_run` datetime default NULL,
1474
   PRIMARY KEY  (`id`)
1474
   PRIMARY KEY  (`id`)
1475
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1475
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1476
1476
1477
--
1477
--
1478
-- Table structure for table 'search_field'
1478
-- Table structure for table 'search_field'
Lines 1485-1492 CREATE TABLE `search_field` ( Link Here
1485
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1485
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1486
  `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1486
  `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1487
  PRIMARY KEY (`id`),
1487
  PRIMARY KEY (`id`),
1488
  UNIQUE KEY (`name`)
1488
  UNIQUE KEY (`name` (191) )
1489
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1489
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1490
1490
1491
--
1491
--
1492
-- Table structure for table `search_history`
1492
-- Table structure for table `search_history`
Lines 1505-1511 CREATE TABLE IF NOT EXISTS `search_history` ( -- patron's opac search history Link Here
1505
  KEY `userid` (`userid`),
1505
  KEY `userid` (`userid`),
1506
  KEY `sessionid` (`sessionid`),
1506
  KEY `sessionid` (`sessionid`),
1507
  PRIMARY KEY  (`id`)
1507
  PRIMARY KEY  (`id`)
1508
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Opac search history results';
1508
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Opac search history results';
1509
1509
1510
--
1510
--
1511
-- Table structure for table 'search_marc_map'
1511
-- Table structure for table 'search_marc_map'
Lines 1518-1526 CREATE TABLE `search_marc_map` ( Link Here
1518
  marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for',
1518
  marc_type ENUM('marc21', 'unimarc', 'normarc') NOT NULL COMMENT 'what MARC type this map is for',
1519
  marc_field VARCHAR(255) NOT NULL COMMENT 'the MARC specifier for this field',
1519
  marc_field VARCHAR(255) NOT NULL COMMENT 'the MARC specifier for this field',
1520
  PRIMARY KEY(`id`),
1520
  PRIMARY KEY(`id`),
1521
  UNIQUE key(index_name, marc_field, marc_type),
1521
  UNIQUE key(index_name, marc_field(191), marc_type),
1522
  INDEX (`index_name`)
1522
  INDEX (`index_name`)
1523
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1523
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1524
1524
1525
--
1525
--
1526
-- Table structure for table 'search_marc_to_field'
1526
-- Table structure for table 'search_marc_to_field'
Lines 1536-1542 CREATE TABLE `search_marc_to_field` ( Link Here
1536
  PRIMARY KEY(search_marc_map_id, search_field_id),
1536
  PRIMARY KEY(search_marc_map_id, search_field_id),
1537
  FOREIGN KEY(search_marc_map_id) REFERENCES search_marc_map(id) ON DELETE CASCADE ON UPDATE CASCADE,
1537
  FOREIGN KEY(search_marc_map_id) REFERENCES search_marc_map(id) ON DELETE CASCADE ON UPDATE CASCADE,
1538
  FOREIGN KEY(search_field_id) REFERENCES search_field(id) ON DELETE CASCADE ON UPDATE CASCADE
1538
  FOREIGN KEY(search_field_id) REFERENCES search_field(id) ON DELETE CASCADE ON UPDATE CASCADE
1539
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1539
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1540
1540
1541
--
1541
--
1542
-- Table structure for table `serial`
1542
-- Table structure for table `serial`
Lines 1560-1566 CREATE TABLE `serial` ( -- issues related to subscriptions Link Here
1560
  claims_count int(11) default 0, -- number of claims made related to this issue
1560
  claims_count int(11) default 0, -- number of claims made related to this issue
1561
  `routingnotes` text, -- notes from the routing list
1561
  `routingnotes` text, -- notes from the routing list
1562
  PRIMARY KEY  (`serialid`)
1562
  PRIMARY KEY  (`serialid`)
1563
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1563
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1564
1564
1565
--
1565
--
1566
-- Table structure for table `sessions`
1566
-- Table structure for table `sessions`
Lines 1571-1577 CREATE TABLE sessions ( Link Here
1571
  `id` varchar(32) NOT NULL,
1571
  `id` varchar(32) NOT NULL,
1572
  `a_session` mediumtext NOT NULL,
1572
  `a_session` mediumtext NOT NULL,
1573
  PRIMARY KEY (`id`)
1573
  PRIMARY KEY (`id`)
1574
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1574
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1575
1575
1576
--
1576
--
1577
-- Table structure for table `sms_providers`
1577
-- Table structure for table `sms_providers`
Lines 1583-1590 CREATE TABLE `sms_providers` ( Link Here
1583
  `name` varchar(255) NOT NULL,
1583
  `name` varchar(255) NOT NULL,
1584
  `domain` varchar(255) NOT NULL,
1584
  `domain` varchar(255) NOT NULL,
1585
  PRIMARY KEY (`id`),
1585
  PRIMARY KEY (`id`),
1586
  UNIQUE KEY `name` (`name`)
1586
  UNIQUE KEY `name` (`name` (191))
1587
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1587
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1588
1588
1589
--
1589
--
1590
-- Table structure for table `borrowers`
1590
-- Table structure for table `borrowers`
Lines 1672-1685 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1672
  KEY `branchcode` (`branchcode`),
1672
  KEY `branchcode` (`branchcode`),
1673
  UNIQUE KEY `userid` (`userid`),
1673
  UNIQUE KEY `userid` (`userid`),
1674
  KEY `guarantorid` (`guarantorid`),
1674
  KEY `guarantorid` (`guarantorid`),
1675
  KEY `surname_idx` (`surname`(255)),
1675
  KEY `surname_idx` (`surname` (191)),
1676
  KEY `firstname_idx` (`firstname`(255)),
1676
  KEY `firstname_idx` (`firstname` (191)),
1677
  KEY `othernames_idx` (`othernames`(255)),
1677
  KEY `othernames_idx` (`othernames` (191)),
1678
  KEY `sms_provider_id` (`sms_provider_id`),
1678
  KEY `sms_provider_id` (`sms_provider_id`),
1679
  CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
1679
  CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
1680
  CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`),
1680
  CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`),
1681
  CONSTRAINT `borrowers_ibfk_3` FOREIGN KEY (`sms_provider_id`) REFERENCES `sms_providers` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
1681
  CONSTRAINT `borrowers_ibfk_3` FOREIGN KEY (`sms_provider_id`) REFERENCES `sms_providers` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
1682
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1682
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1683
1683
1684
--
1684
--
1685
-- Table structure for table `borrower_attributes`
1685
-- Table structure for table `borrower_attributes`
Lines 1692-1703 CREATE TABLE `borrower_attributes` ( -- values of custom patron fields known as Link Here
1692
  `code` varchar(10) NOT NULL, -- foreign key from the borrower_attribute_types table, defines which custom field this value was entered for
1692
  `code` varchar(10) NOT NULL, -- foreign key from the borrower_attribute_types table, defines which custom field this value was entered for
1693
  `attribute` varchar(255) default NULL, -- custom patron field value
1693
  `attribute` varchar(255) default NULL, -- custom patron field value
1694
  KEY `borrowernumber` (`borrowernumber`),
1694
  KEY `borrowernumber` (`borrowernumber`),
1695
  KEY `code_attribute` (`code`, `attribute`),
1695
  KEY `code_attribute` (`code`, `attribute` (191)),
1696
  CONSTRAINT `borrower_attributes_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
1696
  CONSTRAINT `borrower_attributes_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
1697
    ON DELETE CASCADE ON UPDATE CASCADE,
1697
    ON DELETE CASCADE ON UPDATE CASCADE,
1698
  CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`)
1698
  CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN KEY (`code`) REFERENCES `borrower_attribute_types` (`code`)
1699
    ON DELETE CASCADE ON UPDATE CASCADE
1699
    ON DELETE CASCADE ON UPDATE CASCADE
1700
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1700
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1701
1701
1702
--
1702
--
1703
-- Table structure for table `borrower_debarments`
1703
-- Table structure for table `borrower_debarments`
Lines 1717-1723 CREATE TABLE borrower_debarments ( -- tracks restrictions on the patron's record Link Here
1717
  KEY borrowernumber (borrowernumber),
1717
  KEY borrowernumber (borrowernumber),
1718
  CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
1718
  CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)
1719
    ON DELETE CASCADE ON UPDATE CASCADE
1719
    ON DELETE CASCADE ON UPDATE CASCADE
1720
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1720
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1721
1721
1722
--
1722
--
1723
-- Table structure for table borrower_sync
1723
-- Table structure for table borrower_sync
Lines 1735-1741 CREATE TABLE borrower_sync ( Link Here
1735
  PRIMARY KEY (borrowersyncid),
1735
  PRIMARY KEY (borrowersyncid),
1736
  KEY borrowernumber (borrowernumber),
1736
  KEY borrowernumber (borrowernumber),
1737
  CONSTRAINT borrower_sync_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
1737
  CONSTRAINT borrower_sync_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
1738
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1738
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1739
1739
1740
--
1740
--
1741
-- Table structure for table `issues`
1741
-- Table structure for table `issues`
Lines 1752-1758 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1752
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1752
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1753
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1753
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1754
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1754
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1755
  `auto_renew_error` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, -- automatic renewal error
1755
  `auto_renew_error` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- automatic renewal error
1756
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1756
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1757
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1757
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1758
  `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag
1758
  `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag
Lines 1766-1772 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1766
  KEY `bordate` (`borrowernumber`,`timestamp`),
1766
  KEY `bordate` (`borrowernumber`,`timestamp`),
1767
  CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE,
1767
  CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE,
1768
  CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE
1768
  CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE
1769
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1769
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1770
1770
1771
--
1771
--
1772
-- Table structure for table `old_issues`
1772
-- Table structure for table `old_issues`
Lines 1783-1789 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1783
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1783
  `lastreneweddate` datetime default NULL, -- date the item was last renewed
1784
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1784
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1785
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1785
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1786
  `auto_renew_error` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, -- automatic renewal error
1786
  `auto_renew_error` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- automatic renewal error
1787
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1787
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1788
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1788
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1789
  `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag
1789
  `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag
Lines 1798-1804 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1798
    ON DELETE SET NULL ON UPDATE SET NULL,
1798
    ON DELETE SET NULL ON UPDATE SET NULL,
1799
  CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
1799
  CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
1800
    ON DELETE SET NULL ON UPDATE SET NULL
1800
    ON DELETE SET NULL ON UPDATE SET NULL
1801
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1801
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1802
1802
1803
--
1803
--
1804
-- Table structure for table `items_last_borrower`
1804
-- Table structure for table `items_last_borrower`
Lines 1814-1820 CREATE TABLE IF NOT EXISTS `items_last_borrower` ( Link Here
1814
  KEY `borrowernumber` (`borrowernumber`),
1814
  KEY `borrowernumber` (`borrowernumber`),
1815
  CONSTRAINT `items_last_borrower_ibfk_2` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1815
  CONSTRAINT `items_last_borrower_ibfk_2` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1816
  CONSTRAINT `items_last_borrower_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
1816
  CONSTRAINT `items_last_borrower_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
1817
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1817
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1818
1818
1819
--
1819
--
1820
-- Table structure for table `creator_batches`
1820
-- Table structure for table `creator_batches`
Lines 1838-1844 CREATE TABLE `creator_batches` ( Link Here
1838
  CONSTRAINT `creator_batches_ibfk_1` FOREIGN KEY (`borrower_number`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1838
  CONSTRAINT `creator_batches_ibfk_1` FOREIGN KEY (`borrower_number`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1839
  CONSTRAINT `creator_batches_ibfk_2` FOREIGN KEY (`branch_code`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE,
1839
  CONSTRAINT `creator_batches_ibfk_2` FOREIGN KEY (`branch_code`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE,
1840
  CONSTRAINT `creator_batches_ibfk_3` FOREIGN KEY (`item_number`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE
1840
  CONSTRAINT `creator_batches_ibfk_3` FOREIGN KEY (`item_number`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE
1841
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1841
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1842
1842
1843
--
1843
--
1844
-- Table structure for table `opac_news`
1844
-- Table structure for table `opac_news`
Lines 1859-1865 CREATE TABLE `opac_news` ( -- data from the news tool Link Here
1859
  CONSTRAINT `borrowernumber_fk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
1859
  CONSTRAINT `borrowernumber_fk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
1860
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1860
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1861
    ON DELETE CASCADE ON UPDATE CASCADE
1861
    ON DELETE CASCADE ON UPDATE CASCADE
1862
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1862
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1863
1863
1864
--
1864
--
1865
-- Table structure for table `patronimage`
1865
-- Table structure for table `patronimage`
Lines 1872-1878 CREATE TABLE `patronimage` ( -- information related to patron images Link Here
1872
  `imagefile` mediumblob NOT NULL, -- the image
1872
  `imagefile` mediumblob NOT NULL, -- the image
1873
  PRIMARY KEY  (`borrowernumber`),
1873
  PRIMARY KEY  (`borrowernumber`),
1874
  CONSTRAINT `patronimage_fk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1874
  CONSTRAINT `patronimage_fk1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
1875
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1875
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1876
1876
1877
--
1877
--
1878
-- Table structure for table `reserves`
1878
-- Table structure for table `reserves`
Lines 1911-1917 CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha Link Here
1911
  CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1911
  CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1912
  CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1912
  CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1913
  CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE
1913
  CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE
1914
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1914
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1915
1915
1916
--
1916
--
1917
-- Table structure for table `old_reserves`
1917
-- Table structure for table `old_reserves`
Lines 1952-1958 CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b Link Here
1952
    ON DELETE SET NULL ON UPDATE SET NULL,
1952
    ON DELETE SET NULL ON UPDATE SET NULL,
1953
  CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
1953
  CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`)
1954
    ON DELETE SET NULL ON UPDATE SET NULL
1954
    ON DELETE SET NULL ON UPDATE SET NULL
1955
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1955
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1956
1956
1957
--
1957
--
1958
-- Table structure for table `reviews`
1958
-- Table structure for table `reviews`
Lines 1969-1975 CREATE TABLE `reviews` ( -- patron opac comments Link Here
1969
  PRIMARY KEY  (`reviewid`),
1969
  PRIMARY KEY  (`reviewid`),
1970
  CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
1970
  CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
1971
  CONSTRAINT `reviews_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
1971
  CONSTRAINT `reviews_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
1972
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1972
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1973
1973
1974
--
1974
--
1975
-- Table structure for table `special_holidays`
1975
-- Table structure for table `special_holidays`
Lines 1986-1992 CREATE TABLE `special_holidays` ( -- non repeatable holidays/library closings Link Here
1986
  `title` varchar(50) NOT NULL default '', -- title for this closing
1986
  `title` varchar(50) NOT NULL default '', -- title for this closing
1987
  `description` text NOT NULL, -- description of this closing
1987
  `description` text NOT NULL, -- description of this closing
1988
  PRIMARY KEY  (`id`)
1988
  PRIMARY KEY  (`id`)
1989
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1989
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1990
1990
1991
--
1991
--
1992
-- Table structure for table `statistics`
1992
-- Table structure for table `statistics`
Lines 2017-2023 CREATE TABLE `statistics` ( -- information related to transactions (circulation Link Here
2017
  KEY `borrowernumber_idx` (`borrowernumber`),
2017
  KEY `borrowernumber_idx` (`borrowernumber`),
2018
  KEY `associatedborrower_idx` (`associatedborrower`),
2018
  KEY `associatedborrower_idx` (`associatedborrower`),
2019
  KEY `ccode_idx` (`ccode`)
2019
  KEY `ccode_idx` (`ccode`)
2020
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2020
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2021
2021
2022
--
2022
--
2023
-- Table structure for table subscription_frequencies
2023
-- Table structure for table subscription_frequencies
Lines 2032-2038 CREATE TABLE subscription_frequencies ( Link Here
2032
    unitsperissue INTEGER NOT NULL DEFAULT '1',
2032
    unitsperissue INTEGER NOT NULL DEFAULT '1',
2033
    issuesperunit INTEGER NOT NULL DEFAULT '1',
2033
    issuesperunit INTEGER NOT NULL DEFAULT '1',
2034
    PRIMARY KEY (id)
2034
    PRIMARY KEY (id)
2035
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2035
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2036
2036
2037
--
2037
--
2038
-- Table structure for table subscription_numberpatterns
2038
-- Table structure for table subscription_numberpatterns
Lines 2064-2070 CREATE TABLE subscription_numberpatterns ( Link Here
2064
    setto3 INTEGER DEFAULT NULL,
2064
    setto3 INTEGER DEFAULT NULL,
2065
    numbering3 VARCHAR(255) DEFAULT NULL,
2065
    numbering3 VARCHAR(255) DEFAULT NULL,
2066
    PRIMARY KEY (id)
2066
    PRIMARY KEY (id)
2067
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2067
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2068
2068
2069
--
2069
--
2070
-- Table structure for table `subscription`
2070
-- Table structure for table `subscription`
Lines 2117-2123 CREATE TABLE `subscription` ( -- information related to the subscription Link Here
2117
  PRIMARY KEY  (`subscriptionid`),
2117
  PRIMARY KEY  (`subscriptionid`),
2118
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2118
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2119
  CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE
2119
  CONSTRAINT subscription_ibfk_2 FOREIGN KEY (numberpattern) REFERENCES subscription_numberpatterns (id) ON DELETE SET NULL ON UPDATE CASCADE
2120
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2120
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2121
2121
2122
--
2122
--
2123
-- Table structure for table `subscriptionhistory`
2123
-- Table structure for table `subscriptionhistory`
Lines 2135-2141 CREATE TABLE `subscriptionhistory` ( Link Here
2135
  `librariannote` varchar(150) NOT NULL default '',
2135
  `librariannote` varchar(150) NOT NULL default '',
2136
  PRIMARY KEY  (`subscriptionid`),
2136
  PRIMARY KEY  (`subscriptionid`),
2137
  KEY `biblionumber` (`biblionumber`)
2137
  KEY `biblionumber` (`biblionumber`)
2138
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2138
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2139
2139
2140
--
2140
--
2141
-- Table structure for table `subscriptionroutinglist`
2141
-- Table structure for table `subscriptionroutinglist`
Lines 2153-2159 CREATE TABLE `subscriptionroutinglist` ( -- information related to the routing l Link Here
2153
    ON DELETE CASCADE ON UPDATE CASCADE,
2153
    ON DELETE CASCADE ON UPDATE CASCADE,
2154
  CONSTRAINT `subscriptionroutinglist_ibfk_2` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`)
2154
  CONSTRAINT `subscriptionroutinglist_ibfk_2` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`)
2155
    ON DELETE CASCADE ON UPDATE CASCADE
2155
    ON DELETE CASCADE ON UPDATE CASCADE
2156
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2156
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2157
2157
2158
--
2158
--
2159
-- Table structure for table `systempreferences`
2159
-- Table structure for table `systempreferences`
Lines 2167-2173 CREATE TABLE `systempreferences` ( -- global system preferences Link Here
2167
  `explanation` text, -- descriptive text for the system preference
2167
  `explanation` text, -- descriptive text for the system preference
2168
  `type` varchar(20) default NULL, -- type of question this preference asks (multiple choice, plain text, yes or no, etc)
2168
  `type` varchar(20) default NULL, -- type of question this preference asks (multiple choice, plain text, yes or no, etc)
2169
  PRIMARY KEY  (`variable`)
2169
  PRIMARY KEY  (`variable`)
2170
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2170
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2171
2171
2172
--
2172
--
2173
-- Table structure for table `tags`
2173
-- Table structure for table `tags`
Lines 2177-2184 DROP TABLE IF EXISTS `tags`; Link Here
2177
CREATE TABLE `tags` (
2177
CREATE TABLE `tags` (
2178
  `entry` varchar(255) NOT NULL default '',
2178
  `entry` varchar(255) NOT NULL default '',
2179
  `weight` bigint(20) NOT NULL default 0,
2179
  `weight` bigint(20) NOT NULL default 0,
2180
  PRIMARY KEY  (`entry`)
2180
  PRIMARY KEY  (`entry` (191))
2181
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2181
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2182
2182
2183
--
2183
--
2184
-- Table structure for table `tags_all`
2184
-- Table structure for table `tags_all`
Lines 2199-2205 CREATE TABLE `tags_all` ( -- all of the tags Link Here
2199
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
2199
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
2200
  CONSTRAINT `tags_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2200
  CONSTRAINT `tags_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2201
        REFERENCES `biblio`     (`biblionumber`)  ON DELETE CASCADE ON UPDATE CASCADE
2201
        REFERENCES `biblio`     (`biblionumber`)  ON DELETE CASCADE ON UPDATE CASCADE
2202
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2202
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2203
2203
2204
--
2204
--
2205
-- Table structure for table `tags_approval`
2205
-- Table structure for table `tags_approval`
Lines 2207-2213 CREATE TABLE `tags_all` ( -- all of the tags Link Here
2207
2207
2208
DROP TABLE IF EXISTS `tags_approval`;
2208
DROP TABLE IF EXISTS `tags_approval`;
2209
CREATE TABLE `tags_approval` ( -- approved tags
2209
CREATE TABLE `tags_approval` ( -- approved tags
2210
  `term`   varchar(255) NOT NULL, -- the tag
2210
  `term`   varchar(191) NOT NULL, -- the tag
2211
  `approved`     int(1) NOT NULL default '0', -- whether the tag is approved or not (1=yes, 0=pending, -1=rejected)
2211
  `approved`     int(1) NOT NULL default '0', -- whether the tag is approved or not (1=yes, 0=pending, -1=rejected)
2212
  `date_approved` datetime       default NULL, -- the date this tag was approved
2212
  `date_approved` datetime       default NULL, -- the date this tag was approved
2213
  `approved_by` int(11)          default NULL, -- the librarian who approved the tag (borrowers.borrowernumber)
2213
  `approved_by` int(11)          default NULL, -- the librarian who approved the tag (borrowers.borrowernumber)
Lines 2216-2222 CREATE TABLE `tags_approval` ( -- approved tags Link Here
2216
  KEY `tags_approval_borrowers_fk_1` (`approved_by`),
2216
  KEY `tags_approval_borrowers_fk_1` (`approved_by`),
2217
  CONSTRAINT `tags_approval_borrowers_fk_1` FOREIGN KEY (`approved_by`)
2217
  CONSTRAINT `tags_approval_borrowers_fk_1` FOREIGN KEY (`approved_by`)
2218
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
2218
        REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
2219
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2219
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2220
2220
2221
--
2221
--
2222
-- Table structure for table `tags_index`
2222
-- Table structure for table `tags_index`
Lines 2224-2230 CREATE TABLE `tags_approval` ( -- approved tags Link Here
2224
2224
2225
DROP TABLE IF EXISTS `tags_index`;
2225
DROP TABLE IF EXISTS `tags_index`;
2226
CREATE TABLE `tags_index` ( -- a weighted list of all tags and where they are used
2226
CREATE TABLE `tags_index` ( -- a weighted list of all tags and where they are used
2227
  `term`    varchar(255) NOT NULL, -- the tag
2227
  `term`    varchar(191) NOT NULL, -- the tag
2228
  `biblionumber` int(11) NOT NULL, -- the bib record this tag was used on (biblio.biblionumber)
2228
  `biblionumber` int(11) NOT NULL, -- the bib record this tag was used on (biblio.biblionumber)
2229
  `weight`        int(9) NOT NULL default '1', -- the number of times this term was used on this bib record
2229
  `weight`        int(9) NOT NULL default '1', -- the number of times this term was used on this bib record
2230
  PRIMARY KEY  (`term`,`biblionumber`),
2230
  PRIMARY KEY  (`term`,`biblionumber`),
Lines 2233-2239 CREATE TABLE `tags_index` ( -- a weighted list of all tags and where they are us Link Here
2233
        REFERENCES `tags_approval` (`term`)  ON DELETE CASCADE ON UPDATE CASCADE,
2233
        REFERENCES `tags_approval` (`term`)  ON DELETE CASCADE ON UPDATE CASCADE,
2234
  CONSTRAINT `tags_index_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2234
  CONSTRAINT `tags_index_biblionumber_fk_1` FOREIGN KEY (`biblionumber`)
2235
        REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
2235
        REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
2236
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2236
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2237
2237
2238
--
2238
--
2239
-- Table structure for table `userflags`
2239
-- Table structure for table `userflags`
Lines 2246-2252 CREATE TABLE `userflags` ( Link Here
2246
  `flagdesc` varchar(255) default NULL,
2246
  `flagdesc` varchar(255) default NULL,
2247
  `defaulton` int(11) default NULL,
2247
  `defaulton` int(11) default NULL,
2248
  PRIMARY KEY  (`bit`)
2248
  PRIMARY KEY  (`bit`)
2249
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2249
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2250
2250
2251
--
2251
--
2252
-- Table structure for table `virtualshelves`
2252
-- Table structure for table `virtualshelves`
Lines 2265-2271 CREATE TABLE `virtualshelves` ( -- information about lists (or virtual shelves) Link Here
2265
  `allow_change_from_others` tinyint(1) default 0, -- can others change contents?
2265
  `allow_change_from_others` tinyint(1) default 0, -- can others change contents?
2266
  PRIMARY KEY  (`shelfnumber`),
2266
  PRIMARY KEY  (`shelfnumber`),
2267
  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 Members.pm
2267
  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 Members.pm
2268
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2268
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2269
2269
2270
--
2270
--
2271
-- Table structure for table `virtualshelfcontents`
2271
-- Table structure for table `virtualshelfcontents`
Lines 2283-2289 CREATE TABLE `virtualshelfcontents` ( -- information about the titles in a list Link Here
2283
  CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2283
  CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2284
  CONSTRAINT `shelfcontents_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2284
  CONSTRAINT `shelfcontents_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2285
  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 Members.pm
2285
  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 Members.pm
2286
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2286
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2287
2287
2288
--
2288
--
2289
-- Table structure for table `virtualshelfshares`
2289
-- Table structure for table `virtualshelfshares`
Lines 2298-2304 CREATE TABLE `virtualshelfshares` ( -- shared private lists Link Here
2298
  `sharedate` datetime,  -- date of invitation or acceptance of invitation
2298
  `sharedate` datetime,  -- date of invitation or acceptance of invitation
2299
  CONSTRAINT `virtualshelfshares_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2299
  CONSTRAINT `virtualshelfshares_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2300
  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 Members.pm
2300
  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 Members.pm
2301
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2301
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2302
2302
2303
--
2303
--
2304
-- Table structure for table `z3950servers`
2304
-- Table structure for table `z3950servers`
Lines 2324-2330 CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets u Link Here
2324
  `sru_fields` mediumtext default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2324
  `sru_fields` mediumtext default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2325
  `add_xslt` mediumtext default NULL, -- zero or more paths to XSLT files to be processed on the search results
2325
  `add_xslt` mediumtext default NULL, -- zero or more paths to XSLT files to be processed on the search results
2326
  PRIMARY KEY  (`id`)
2326
  PRIMARY KEY  (`id`)
2327
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2327
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2328
2328
2329
--
2329
--
2330
-- Table structure for table `zebraqueue`
2330
-- Table structure for table `zebraqueue`
Lines 2340-2346 CREATE TABLE `zebraqueue` ( Link Here
2340
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
2340
  `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
2341
  PRIMARY KEY  (`id`),
2341
  PRIMARY KEY  (`id`),
2342
  KEY `zebraqueue_lookup` (`server`, `biblio_auth_number`, `operation`, `done`)
2342
  KEY `zebraqueue_lookup` (`server`, `biblio_auth_number`, `operation`, `done`)
2343
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2343
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2344
2344
2345
--
2345
--
2346
-- Table structure for table `services_throttle`
2346
-- Table structure for table `services_throttle`
Lines 2351-2357 CREATE TABLE `services_throttle` ( Link Here
2351
  `service_type` varchar(10) NOT NULL default '',
2351
  `service_type` varchar(10) NOT NULL default '',
2352
  `service_count` varchar(45) default NULL,
2352
  `service_count` varchar(45) default NULL,
2353
  PRIMARY KEY  (`service_type`)
2353
  PRIMARY KEY  (`service_type`)
2354
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2354
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2355
2355
2356
--
2356
--
2357
-- Table structure for table `language_subtag_registry`
2357
-- Table structure for table `language_subtag_registry`
Lines 2368-2374 CREATE TABLE language_subtag_registry ( Link Here
2368
        id int(11) NOT NULL auto_increment,
2368
        id int(11) NOT NULL auto_increment,
2369
        PRIMARY KEY  (`id`),
2369
        PRIMARY KEY  (`id`),
2370
        KEY `subtag` (`subtag`)
2370
        KEY `subtag` (`subtag`)
2371
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2371
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2372
2372
2373
--
2373
--
2374
-- Table structure for table `language_rfc4646_to_iso639`
2374
-- Table structure for table `language_rfc4646_to_iso639`
Lines 2384-2390 CREATE TABLE language_rfc4646_to_iso639 ( Link Here
2384
        id int(11) NOT NULL auto_increment,
2384
        id int(11) NOT NULL auto_increment,
2385
        PRIMARY KEY  (`id`),
2385
        PRIMARY KEY  (`id`),
2386
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2386
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2387
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2387
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2388
2388
2389
--
2389
--
2390
-- Table structure for table `language_descriptions`
2390
-- Table structure for table `language_descriptions`
Lines 2400-2406 CREATE TABLE language_descriptions ( Link Here
2400
        PRIMARY KEY  (`id`),
2400
        PRIMARY KEY  (`id`),
2401
        KEY `lang` (`lang`),
2401
        KEY `lang` (`lang`),
2402
        KEY `subtag_type_lang` (`subtag`, `type`, `lang`)
2402
        KEY `subtag_type_lang` (`subtag`, `type`, `lang`)
2403
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2403
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2404
2404
2405
--
2405
--
2406
-- Table structure for table `language_script_bidi`
2406
-- Table structure for table `language_script_bidi`
Lines 2412-2418 CREATE TABLE language_script_bidi ( Link Here
2412
        rfc4646_subtag varchar(25), -- script subtag, Arab, Hebr, etc.
2412
        rfc4646_subtag varchar(25), -- script subtag, Arab, Hebr, etc.
2413
        bidi varchar(3), -- rtl ltr
2413
        bidi varchar(3), -- rtl ltr
2414
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2414
        KEY `rfc4646_subtag` (`rfc4646_subtag`)
2415
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2415
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2416
2416
2417
--
2417
--
2418
-- Table structure for table `language_script_mapping`
2418
-- Table structure for table `language_script_mapping`
Lines 2425-2431 CREATE TABLE language_script_mapping ( Link Here
2425
        language_subtag varchar(25),
2425
        language_subtag varchar(25),
2426
        script_subtag varchar(25),
2426
        script_subtag varchar(25),
2427
        KEY `language_subtag` (`language_subtag`)
2427
        KEY `language_subtag` (`language_subtag`)
2428
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2428
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2429
2429
2430
--
2430
--
2431
-- Table structure for table `permissions`
2431
-- Table structure for table `permissions`
Lines 2439-2445 CREATE TABLE `permissions` ( Link Here
2439
  PRIMARY KEY  (`module_bit`, `code`),
2439
  PRIMARY KEY  (`module_bit`, `code`),
2440
  CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`)
2440
  CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`)
2441
    ON DELETE CASCADE ON UPDATE CASCADE
2441
    ON DELETE CASCADE ON UPDATE CASCADE
2442
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2442
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2443
2443
2444
--
2444
--
2445
-- Table structure for table `serialitems`
2445
-- Table structure for table `serialitems`
Lines 2453-2459 CREATE TABLE `serialitems` ( Link Here
2453
	KEY `serialitems_sfk_1` (`serialid`),
2453
	KEY `serialitems_sfk_1` (`serialid`),
2454
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2454
	CONSTRAINT `serialitems_sfk_1` FOREIGN KEY (`serialid`) REFERENCES `serial` (`serialid`) ON DELETE CASCADE ON UPDATE CASCADE,
2455
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2455
	CONSTRAINT `serialitems_sfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
2456
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2456
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2457
2457
2458
--
2458
--
2459
-- Table structure for table `user_permissions`
2459
-- Table structure for table `user_permissions`
Lines 2468-2474 CREATE TABLE `user_permissions` ( Link Here
2468
    ON DELETE CASCADE ON UPDATE CASCADE,
2468
    ON DELETE CASCADE ON UPDATE CASCADE,
2469
  CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY (`module_bit`, `code`) REFERENCES `permissions` (`module_bit`, `code`)
2469
  CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY (`module_bit`, `code`) REFERENCES `permissions` (`module_bit`, `code`)
2470
    ON DELETE CASCADE ON UPDATE CASCADE
2470
    ON DELETE CASCADE ON UPDATE CASCADE
2471
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2471
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2472
2472
2473
--
2473
--
2474
-- Table structure for table `tmp_holdsqueue`
2474
-- Table structure for table `tmp_holdsqueue`
Lines 2491-2497 CREATE TABLE `tmp_holdsqueue` ( Link Here
2491
  `pickbranch` varchar(10) default NULL,
2491
  `pickbranch` varchar(10) default NULL,
2492
  `notes` text,
2492
  `notes` text,
2493
  `item_level_request` tinyint(4) NOT NULL default 0
2493
  `item_level_request` tinyint(4) NOT NULL default 0
2494
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2494
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2495
2495
2496
--
2496
--
2497
-- Table structure for table `message_transport_types`
2497
-- Table structure for table `message_transport_types`
Lines 2501-2507 DROP TABLE IF EXISTS `message_transport_types`; Link Here
2501
CREATE TABLE `message_transport_types` (
2501
CREATE TABLE `message_transport_types` (
2502
  `message_transport_type` varchar(20) NOT NULL,
2502
  `message_transport_type` varchar(20) NOT NULL,
2503
  PRIMARY KEY  (`message_transport_type`)
2503
  PRIMARY KEY  (`message_transport_type`)
2504
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2504
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2505
2505
2506
--
2506
--
2507
-- Table structure for table `message_queue`
2507
-- Table structure for table `message_queue`
Lines 2526-2532 CREATE TABLE `message_queue` ( Link Here
2526
  KEY `message_transport_type` (`message_transport_type`),
2526
  KEY `message_transport_type` (`message_transport_type`),
2527
  CONSTRAINT `messageq_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2527
  CONSTRAINT `messageq_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2528
  CONSTRAINT `messageq_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE RESTRICT ON UPDATE CASCADE
2528
  CONSTRAINT `messageq_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE RESTRICT ON UPDATE CASCADE
2529
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2529
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2530
2530
2531
--
2531
--
2532
-- Table structure for table `letter`
2532
-- Table structure for table `letter`
Lines 2546-2552 CREATE TABLE `letter` ( -- table for all notice templates in Koha Link Here
2546
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`, `lang`),
2546
  PRIMARY KEY  (`module`,`code`, `branchcode`, `message_transport_type`, `lang`),
2547
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2547
  CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`)
2548
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2548
  REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2549
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2549
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2550
2550
2551
--
2551
--
2552
-- Table structure for table `overduerules_transport_types`
2552
-- Table structure for table `overduerules_transport_types`
Lines 2561-2567 CREATE TABLE overduerules_transport_types( Link Here
2561
    PRIMARY KEY (id),
2561
    PRIMARY KEY (id),
2562
    CONSTRAINT overduerules_fk FOREIGN KEY (overduerules_id) REFERENCES overduerules (overduerules_id) ON DELETE CASCADE ON UPDATE CASCADE,
2562
    CONSTRAINT overduerules_fk FOREIGN KEY (overduerules_id) REFERENCES overduerules (overduerules_id) ON DELETE CASCADE ON UPDATE CASCADE,
2563
    CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE
2563
    CONSTRAINT mtt_fk FOREIGN KEY (message_transport_type) REFERENCES message_transport_types (message_transport_type) ON DELETE CASCADE ON UPDATE CASCADE
2564
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2564
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2565
2565
2566
--
2566
--
2567
-- Table structure for table `message_attributes`
2567
-- Table structure for table `message_attributes`
Lines 2574-2580 CREATE TABLE `message_attributes` ( Link Here
2574
  `takes_days` tinyint(1) NOT NULL default '0',
2574
  `takes_days` tinyint(1) NOT NULL default '0',
2575
  PRIMARY KEY  (`message_attribute_id`),
2575
  PRIMARY KEY  (`message_attribute_id`),
2576
  UNIQUE KEY `message_name` (`message_name`)
2576
  UNIQUE KEY `message_name` (`message_name`)
2577
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2577
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2578
2578
2579
--
2579
--
2580
-- Table structure for table `message_transports`
2580
-- Table structure for table `message_transports`
Lines 2593-2599 CREATE TABLE `message_transports` ( Link Here
2593
  KEY `letter_module` (`letter_module`,`letter_code`),
2593
  KEY `letter_module` (`letter_module`,`letter_code`),
2594
  CONSTRAINT `message_transports_ibfk_1` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2594
  CONSTRAINT `message_transports_ibfk_1` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2595
  CONSTRAINT `message_transports_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2595
  CONSTRAINT `message_transports_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE
2596
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2596
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2597
2597
2598
--
2598
--
2599
-- Table structure for table `borrower_files`
2599
-- Table structure for table `borrower_files`
Lines 2611-2617 CREATE TABLE IF NOT EXISTS `borrower_files` ( -- files attached to the patron/bo Link Here
2611
  PRIMARY KEY (`file_id`),
2611
  PRIMARY KEY (`file_id`),
2612
  KEY `borrowernumber` (`borrowernumber`),
2612
  KEY `borrowernumber` (`borrowernumber`),
2613
  CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
2613
  CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
2614
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2614
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2615
2615
2616
--
2616
--
2617
-- Table structure for table `borrower_message_preferences`
2617
-- Table structure for table `borrower_message_preferences`
Lines 2632-2638 CREATE TABLE `borrower_message_preferences` ( Link Here
2632
  CONSTRAINT `borrower_message_preferences_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2632
  CONSTRAINT `borrower_message_preferences_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2633
  CONSTRAINT `borrower_message_preferences_ibfk_2` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2633
  CONSTRAINT `borrower_message_preferences_ibfk_2` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2634
  CONSTRAINT `borrower_message_preferences_ibfk_3` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
2634
  CONSTRAINT `borrower_message_preferences_ibfk_3` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE ON UPDATE CASCADE
2635
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2635
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2636
2636
2637
--
2637
--
2638
-- Table structure for table `borrower_message_transport_preferences`
2638
-- Table structure for table `borrower_message_transport_preferences`
Lines 2646-2652 CREATE TABLE `borrower_message_transport_preferences` ( Link Here
2646
  KEY `message_transport_type` (`message_transport_type`),
2646
  KEY `message_transport_type` (`message_transport_type`),
2647
  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,
2647
  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,
2648
  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
2648
  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
2649
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2649
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2650
2650
2651
--
2651
--
2652
-- Table structure for the table branch_transfer_limits
2652
-- Table structure for the table branch_transfer_limits
Lines 2660-2666 CREATE TABLE branch_transfer_limits ( Link Here
2660
    itemtype varchar(10) NULL,
2660
    itemtype varchar(10) NULL,
2661
    ccode varchar(10) NULL,
2661
    ccode varchar(10) NULL,
2662
    PRIMARY KEY  (limitId)
2662
    PRIMARY KEY  (limitId)
2663
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2663
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2664
2664
2665
--
2665
--
2666
-- Table structure for table `item_circulation_alert_preferences`
2666
-- Table structure for table `item_circulation_alert_preferences`
Lines 2675-2681 CREATE TABLE `item_circulation_alert_preferences` ( Link Here
2675
  `notification` varchar(16) NOT NULL,
2675
  `notification` varchar(16) NOT NULL,
2676
  PRIMARY KEY  (`id`),
2676
  PRIMARY KEY  (`id`),
2677
  KEY `branchcode` (`branchcode`,`categorycode`,`item_type`, `notification`)
2677
  KEY `branchcode` (`branchcode`,`categorycode`,`item_type`, `notification`)
2678
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2678
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2679
2679
2680
--
2680
--
2681
-- Table structure for table `messages`
2681
-- Table structure for table `messages`
Lines 2691-2697 CREATE TABLE `messages` ( -- circulation messages left via the patron's check ou Link Here
2691
  `manager_id` int(11) default NULL, -- creator of message
2691
  `manager_id` int(11) default NULL, -- creator of message
2692
  PRIMARY KEY (`message_id`),
2692
  PRIMARY KEY (`message_id`),
2693
  CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL
2693
  CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL
2694
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2694
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2695
2695
2696
--
2696
--
2697
-- Table structure for table `accountlines`
2697
-- Table structure for table `accountlines`
Lines 2720-2726 CREATE TABLE `accountlines` ( Link Here
2720
  KEY `itemnumber` (`itemnumber`),
2720
  KEY `itemnumber` (`itemnumber`),
2721
  CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2721
  CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
2722
  CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL
2722
  CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL
2723
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2723
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2724
2724
2725
--
2725
--
2726
-- Table structure for table `account_offset_types`
2726
-- Table structure for table `account_offset_types`
Lines 2730-2736 DROP TABLE IF EXISTS `account_offset_types`; Link Here
2730
CREATE TABLE `account_offset_types` (
2730
CREATE TABLE `account_offset_types` (
2731
  `type` varchar(16) NOT NULL, -- The type of offset this is
2731
  `type` varchar(16) NOT NULL, -- The type of offset this is
2732
  PRIMARY KEY (`type`)
2732
  PRIMARY KEY (`type`)
2733
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2733
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2734
2734
2735
--
2735
--
2736
-- Table structure for table `account_offsets`
2736
-- Table structure for table `account_offsets`
Lines 2748-2754 CREATE TABLE `account_offsets` ( Link Here
2748
  CONSTRAINT `account_offsets_ibfk_p` FOREIGN KEY (`credit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2748
  CONSTRAINT `account_offsets_ibfk_p` FOREIGN KEY (`credit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2749
  CONSTRAINT `account_offsets_ibfk_f` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2749
  CONSTRAINT `account_offsets_ibfk_f` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2750
  CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE
2750
  CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE
2751
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2751
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2752
2752
2753
--
2753
--
2754
-- Table structure for table `action_logs`
2754
-- Table structure for table `action_logs`
Lines 2772-2778 CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the Link Here
2772
  KEY `object_idx` (`object`),
2772
  KEY `object_idx` (`object`),
2773
  KEY `info_idx` (`info`(255)),
2773
  KEY `info_idx` (`info`(255)),
2774
  KEY `interface` (`interface`)
2774
  KEY `interface` (`interface`)
2775
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2775
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2776
2776
2777
--
2777
--
2778
-- Table structure for table `alert`
2778
-- Table structure for table `alert`
Lines 2787-2793 CREATE TABLE `alert` ( Link Here
2787
  PRIMARY KEY  (`alertid`),
2787
  PRIMARY KEY  (`alertid`),
2788
  KEY `borrowernumber` (`borrowernumber`),
2788
  KEY `borrowernumber` (`borrowernumber`),
2789
  KEY `type` (`type`,`externalid`)
2789
  KEY `type` (`type`,`externalid`)
2790
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2790
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2791
2791
2792
--
2792
--
2793
-- Table structure for table `aqbooksellers`
2793
-- Table structure for table `aqbooksellers`
Lines 2827-2833 CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquis Link Here
2827
  KEY `name` (`name`(255)),
2827
  KEY `name` (`name`(255)),
2828
  CONSTRAINT `aqbooksellers_ibfk_1` FOREIGN KEY (`listprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE,
2828
  CONSTRAINT `aqbooksellers_ibfk_1` FOREIGN KEY (`listprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE,
2829
  CONSTRAINT `aqbooksellers_ibfk_2` FOREIGN KEY (`invoiceprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE
2829
  CONSTRAINT `aqbooksellers_ibfk_2` FOREIGN KEY (`invoiceprice`) REFERENCES `currency` (`currency`) ON DELETE CASCADE ON UPDATE CASCADE
2830
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2830
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2831
2831
2832
--
2832
--
2833
-- Table structure for table `aqbasketgroups`
2833
-- Table structure for table `aqbasketgroups`
Lines 2846-2852 CREATE TABLE `aqbasketgroups` ( Link Here
2846
  PRIMARY KEY  (`id`),
2846
  PRIMARY KEY  (`id`),
2847
  KEY `booksellerid` (`booksellerid`),
2847
  KEY `booksellerid` (`booksellerid`),
2848
  CONSTRAINT `aqbasketgroups_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
2848
  CONSTRAINT `aqbasketgroups_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
2849
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2849
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2850
2850
2851
--
2851
--
2852
-- Table structure for table `aqbudgets`
2852
-- Table structure for table `aqbudgets`
Lines 2875-2881 CREATE TABLE `aqbudgets` ( -- information related to Funds Link Here
2875
  KEY `budget_branchcode` (`budget_branchcode`),
2875
  KEY `budget_branchcode` (`budget_branchcode`),
2876
  KEY `budget_period_id` (`budget_period_id`),
2876
  KEY `budget_period_id` (`budget_period_id`),
2877
  KEY `budget_owner_id` (`budget_owner_id`)
2877
  KEY `budget_owner_id` (`budget_owner_id`)
2878
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2878
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2879
2879
2880
--
2880
--
2881
-- Table structure for table aqbudgetborrowers
2881
-- Table structure for table aqbudgetborrowers
Lines 2892-2898 CREATE TABLE aqbudgetborrowers ( Link Here
2892
  CONSTRAINT aqbudgetborrowers_ibfk_2 FOREIGN KEY (borrowernumber)
2892
  CONSTRAINT aqbudgetborrowers_ibfk_2 FOREIGN KEY (borrowernumber)
2893
    REFERENCES borrowers (borrowernumber)
2893
    REFERENCES borrowers (borrowernumber)
2894
    ON DELETE CASCADE ON UPDATE CASCADE
2894
    ON DELETE CASCADE ON UPDATE CASCADE
2895
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2895
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2896
2896
2897
--
2897
--
2898
-- Table structure for table `aqbudgetperiods`
2898
-- Table structure for table `aqbudgetperiods`
Lines 2911-2917 CREATE TABLE `aqbudgetperiods` ( -- information related to Budgets Link Here
2911
  `sort1_authcat` varchar(10) default NULL, -- statistical category for this budget
2911
  `sort1_authcat` varchar(10) default NULL, -- statistical category for this budget
2912
  `sort2_authcat` varchar(10) default NULL, -- second statistical category for this budget
2912
  `sort2_authcat` varchar(10) default NULL, -- second statistical category for this budget
2913
  PRIMARY KEY  (`budget_period_id`)
2913
  PRIMARY KEY  (`budget_period_id`)
2914
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2914
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2915
2915
2916
--
2916
--
2917
-- Table structure for table `aqbudgets_planning`
2917
-- Table structure for table `aqbudgets_planning`
Lines 2929-2935 CREATE TABLE `aqbudgets_planning` ( Link Here
2929
  PRIMARY KEY  (`plan_id`),
2929
  PRIMARY KEY  (`plan_id`),
2930
  KEY `budget_period_id` (`budget_period_id`),
2930
  KEY `budget_period_id` (`budget_period_id`),
2931
  CONSTRAINT `aqbudgets_planning_ifbk_1` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE
2931
  CONSTRAINT `aqbudgets_planning_ifbk_1` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE
2932
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2932
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2933
2933
2934
--
2934
--
2935
-- Table structure for table 'aqcontacts'
2935
-- Table structure for table 'aqcontacts'
Lines 2954-2960 CREATE TABLE aqcontacts ( Link Here
2954
  PRIMARY KEY  (id),
2954
  PRIMARY KEY  (id),
2955
  CONSTRAINT booksellerid_aqcontacts_fk FOREIGN KEY (booksellerid)
2955
  CONSTRAINT booksellerid_aqcontacts_fk FOREIGN KEY (booksellerid)
2956
       REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE
2956
       REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE
2957
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;
2957
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
2958
2958
2959
--
2959
--
2960
-- Table structure for table 'aqcontract'
2960
-- Table structure for table 'aqcontract'
Lines 2971-2977 CREATE TABLE `aqcontract` ( Link Here
2971
  PRIMARY KEY  (`contractnumber`),
2971
  PRIMARY KEY  (`contractnumber`),
2972
  CONSTRAINT `booksellerid_fk1` FOREIGN KEY (`booksellerid`)
2972
  CONSTRAINT `booksellerid_fk1` FOREIGN KEY (`booksellerid`)
2973
       REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
2973
       REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
2974
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
2974
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;
2975
2975
2976
--
2976
--
2977
-- Table structure for table `aqbasket`
2977
-- Table structure for table `aqbasket`
Lines 3004-3010 CREATE TABLE `aqbasket` ( -- stores data about baskets in acquisitions Link Here
3004
  CONSTRAINT `aqbasket_ibfk_2` FOREIGN KEY (`contractnumber`) REFERENCES `aqcontract` (`contractnumber`),
3004
  CONSTRAINT `aqbasket_ibfk_2` FOREIGN KEY (`contractnumber`) REFERENCES `aqcontract` (`contractnumber`),
3005
  CONSTRAINT `aqbasket_ibfk_3` FOREIGN KEY (`basketgroupid`) REFERENCES `aqbasketgroups` (`id`) ON UPDATE CASCADE,
3005
  CONSTRAINT `aqbasket_ibfk_3` FOREIGN KEY (`basketgroupid`) REFERENCES `aqbasketgroups` (`id`) ON UPDATE CASCADE,
3006
  CONSTRAINT aqbasket_ibfk_4 FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE SET NULL
3006
  CONSTRAINT aqbasket_ibfk_4 FOREIGN KEY (branch) REFERENCES branches (branchcode) ON UPDATE CASCADE ON DELETE SET NULL
3007
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3007
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3008
3008
3009
--
3009
--
3010
-- Table structure for table aqbasketusers
3010
-- Table structure for table aqbasketusers
Lines 3017-3023 CREATE TABLE aqbasketusers ( Link Here
3017
  PRIMARY KEY (basketno,borrowernumber),
3017
  PRIMARY KEY (basketno,borrowernumber),
3018
  CONSTRAINT aqbasketusers_ibfk_1 FOREIGN KEY (basketno) REFERENCES aqbasket (basketno) ON UPDATE CASCADE ON DELETE CASCADE,
3018
  CONSTRAINT aqbasketusers_ibfk_1 FOREIGN KEY (basketno) REFERENCES aqbasket (basketno) ON UPDATE CASCADE ON DELETE CASCADE,
3019
  CONSTRAINT aqbasketusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON UPDATE CASCADE ON DELETE CASCADE
3019
  CONSTRAINT aqbasketusers_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON UPDATE CASCADE ON DELETE CASCADE
3020
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3020
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3021
3021
3022
--
3022
--
3023
-- Table structure for table `suggestions`
3023
-- Table structure for table `suggestions`
Lines 3063-3069 CREATE TABLE `suggestions` ( -- purchase suggestions Link Here
3063
  KEY `biblionumber` (`biblionumber`),
3063
  KEY `biblionumber` (`biblionumber`),
3064
  KEY `branchcode` (`branchcode`),
3064
  KEY `branchcode` (`branchcode`),
3065
  CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE
3065
  CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE
3066
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3066
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3067
3067
3068
--
3068
--
3069
-- Table structure for table vendor_edi_accounts
3069
-- Table structure for table vendor_edi_accounts
Lines 3095-3101 CREATE TABLE IF NOT EXISTS vendor_edi_accounts ( Link Here
3095
  KEY shipmentbudget (shipment_budget),
3095
  KEY shipmentbudget (shipment_budget),
3096
  CONSTRAINT vfk_vendor_id FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ),
3096
  CONSTRAINT vfk_vendor_id FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ),
3097
  CONSTRAINT vfk_shipment_budget FOREIGN KEY ( shipment_budget ) REFERENCES aqbudgets ( budget_id )
3097
  CONSTRAINT vfk_shipment_budget FOREIGN KEY ( shipment_budget ) REFERENCES aqbudgets ( budget_id )
3098
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3098
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3099
3099
3100
--
3100
--
3101
-- Table structure for table edifact_messages
3101
-- Table structure for table edifact_messages
Lines 3120-3126 CREATE TABLE IF NOT EXISTS edifact_messages ( Link Here
3120
  CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ) ON DELETE CASCADE ON UPDATE CASCADE,
3120
  CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ) ON DELETE CASCADE ON UPDATE CASCADE,
3121
  CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ) ON DELETE CASCADE ON UPDATE CASCADE,
3121
  CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ) ON DELETE CASCADE ON UPDATE CASCADE,
3122
  CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) ON DELETE CASCADE ON UPDATE CASCADE
3122
  CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) ON DELETE CASCADE ON UPDATE CASCADE
3123
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3123
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3124
3124
3125
--
3125
--
3126
-- Table structure for table aqinvoices
3126
-- Table structure for table aqinvoices
Lines 3141-3147 CREATE TABLE aqinvoices ( Link Here
3141
  CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE,
3141
  CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE,
3142
  CONSTRAINT edifact_msg_fk FOREIGN KEY ( message_id ) REFERENCES edifact_messages ( id ) ON DELETE SET NULL,
3142
  CONSTRAINT edifact_msg_fk FOREIGN KEY ( message_id ) REFERENCES edifact_messages ( id ) ON DELETE SET NULL,
3143
  CONSTRAINT aqinvoices_fk_shipmentcost_budgetid FOREIGN KEY (shipmentcost_budgetid) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE
3143
  CONSTRAINT aqinvoices_fk_shipmentcost_budgetid FOREIGN KEY (shipmentcost_budgetid) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE
3144
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3144
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3145
3145
3146
--
3146
--
3147
-- Table structure for table `aqorders`
3147
-- Table structure for table `aqorders`
Lines 3197-3203 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
3197
  line_item_id varchar(35) default NULL, -- Supplier's article id for Edifact orderline
3197
  line_item_id varchar(35) default NULL, -- Supplier's article id for Edifact orderline
3198
  suppliers_reference_number varchar(35) default NULL, -- Suppliers unique edifact quote ref
3198
  suppliers_reference_number varchar(35) default NULL, -- Suppliers unique edifact quote ref
3199
  suppliers_reference_qualifier varchar(3) default NULL, -- Type of number above usually 'QLI'
3199
  suppliers_reference_qualifier varchar(3) default NULL, -- Type of number above usually 'QLI'
3200
  `suppliers_report` text COLLATE utf8_unicode_ci, -- reports received from suppliers
3200
  `suppliers_report` text COLLATE utf8mb4_unicode_ci, -- reports received from suppliers
3201
  PRIMARY KEY  (`ordernumber`),
3201
  PRIMARY KEY  (`ordernumber`),
3202
  KEY `basketno` (`basketno`),
3202
  KEY `basketno` (`basketno`),
3203
  KEY `biblionumber` (`biblionumber`),
3203
  KEY `biblionumber` (`biblionumber`),
Lines 3210-3216 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
3210
  CONSTRAINT aqorders_ibfk_3 FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE SET NULL ON UPDATE CASCADE,
3210
  CONSTRAINT aqorders_ibfk_3 FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE SET NULL ON UPDATE CASCADE,
3211
  CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE,
3211
  CONSTRAINT `aqorders_subscriptionid` FOREIGN KEY (`subscriptionid`) REFERENCES `subscription` (`subscriptionid`) ON DELETE CASCADE ON UPDATE CASCADE,
3212
  CONSTRAINT `aqorders_currency` FOREIGN KEY (`currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL
3212
  CONSTRAINT `aqorders_currency` FOREIGN KEY (`currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL
3213
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3213
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3214
3214
3215
--
3215
--
3216
-- Table structure for table `aqorder_users`
3216
-- Table structure for table `aqorder_users`
Lines 3223-3229 CREATE TABLE aqorder_users ( -- Mapping orders to patrons for notification sendi Link Here
3223
    PRIMARY KEY (ordernumber, borrowernumber),
3223
    PRIMARY KEY (ordernumber, borrowernumber),
3224
    CONSTRAINT aqorder_users_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3224
    CONSTRAINT aqorder_users_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3225
    CONSTRAINT aqorder_users_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
3225
    CONSTRAINT aqorder_users_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
3226
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3226
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3227
3227
3228
--
3228
--
3229
-- Table structure for table `aqorders_items`
3229
-- Table structure for table `aqorders_items`
Lines 3237-3243 CREATE TABLE `aqorders_items` ( -- information on items entered in the acquisiti Link Here
3237
  PRIMARY KEY  (`itemnumber`),
3237
  PRIMARY KEY  (`itemnumber`),
3238
  KEY `ordernumber` (`ordernumber`),
3238
  KEY `ordernumber` (`ordernumber`),
3239
  CONSTRAINT aqorders_items_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE
3239
  CONSTRAINT aqorders_items_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE
3240
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3240
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3241
3241
3242
--
3242
--
3243
-- Table structure for table aqorders_transfers
3243
-- Table structure for table aqorders_transfers
Lines 3252-3258 CREATE TABLE aqorders_transfers ( Link Here
3252
  UNIQUE KEY ordernumber_to (ordernumber_to),
3252
  UNIQUE KEY ordernumber_to (ordernumber_to),
3253
  CONSTRAINT aqorders_transfers_ordernumber_from FOREIGN KEY (ordernumber_from) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE,
3253
  CONSTRAINT aqorders_transfers_ordernumber_from FOREIGN KEY (ordernumber_from) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE,
3254
  CONSTRAINT aqorders_transfers_ordernumber_to FOREIGN KEY (ordernumber_to) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE
3254
  CONSTRAINT aqorders_transfers_ordernumber_to FOREIGN KEY (ordernumber_to) REFERENCES aqorders (ordernumber) ON DELETE SET NULL ON UPDATE CASCADE
3255
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3255
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3256
3256
3257
--
3257
--
3258
-- Table structure for table `fieldmapping`
3258
-- Table structure for table `fieldmapping`
Lines 3266-3272 CREATE TABLE `fieldmapping` ( -- koha to keyword mapping Link Here
3266
  `fieldcode` char(3) NOT NULL, -- marc field number to map to this keyword
3266
  `fieldcode` char(3) NOT NULL, -- marc field number to map to this keyword
3267
  `subfieldcode` char(1) NOT NULL, -- marc subfield associated with the fieldcode to map to this keyword
3267
  `subfieldcode` char(1) NOT NULL, -- marc subfield associated with the fieldcode to map to this keyword
3268
  PRIMARY KEY  (`id`)
3268
  PRIMARY KEY  (`id`)
3269
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3269
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3270
3270
3271
--
3271
--
3272
-- Table structure for table `transport_cost`
3272
-- Table structure for table `transport_cost`
Lines 3282-3288 CREATE TABLE transport_cost ( Link Here
3282
      PRIMARY KEY (frombranch, tobranch),
3282
      PRIMARY KEY (frombranch, tobranch),
3283
      CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE,
3283
      CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE,
3284
      CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3284
      CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3285
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3285
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3286
3286
3287
--
3287
--
3288
-- Table structure for table `biblioimages`
3288
-- Table structure for table `biblioimages`
Lines 3298-3304 CREATE TABLE `biblioimages` ( -- local cover images Link Here
3298
 `thumbnail` mediumblob NOT NULL, -- thumbnail file contents
3298
 `thumbnail` mediumblob NOT NULL, -- thumbnail file contents
3299
 PRIMARY KEY (`imagenumber`),
3299
 PRIMARY KEY (`imagenumber`),
3300
 CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
3300
 CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
3301
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3301
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3302
3302
3303
--
3303
--
3304
-- Table structure for table `social_data`
3304
-- Table structure for table `social_data`
Lines 3314-3320 CREATE TABLE IF NOT EXISTS `social_data` ( Link Here
3314
  `score_avg` DECIMAL(5,2),
3314
  `score_avg` DECIMAL(5,2),
3315
  `num_scores` INT,
3315
  `num_scores` INT,
3316
  PRIMARY KEY  (`isbn`)
3316
  PRIMARY KEY  (`isbn`)
3317
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3317
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3318
3318
3319
--
3319
--
3320
-- 'Ratings' table. This tracks the star ratings set by borrowers.
3320
-- 'Ratings' table. This tracks the star ratings set by borrowers.
Lines 3329-3335 CREATE TABLE ratings ( -- information related to the star ratings in the OPAC Link Here
3329
    PRIMARY KEY  (borrowernumber,biblionumber),
3329
    PRIMARY KEY  (borrowernumber,biblionumber),
3330
    CONSTRAINT ratings_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3330
    CONSTRAINT ratings_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
3331
    CONSTRAINT ratings_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE
3331
    CONSTRAINT ratings_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE
3332
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3332
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3333
3333
3334
--
3334
--
3335
-- Table structure for table `quotes`
3335
-- Table structure for table `quotes`
Lines 3342-3348 CREATE TABLE `quotes` ( -- data for the quote of the day feature Link Here
3342
  `text` mediumtext NOT NULL, -- text of the quote
3342
  `text` mediumtext NOT NULL, -- text of the quote
3343
  `timestamp` datetime NOT NULL, -- date and time that the quote last appeared in the opac
3343
  `timestamp` datetime NOT NULL, -- date and time that the quote last appeared in the opac
3344
  PRIMARY KEY (`id`)
3344
  PRIMARY KEY (`id`)
3345
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3345
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3346
3346
3347
--
3347
--
3348
-- Table structure for table categories_branches
3348
-- Table structure for table categories_branches
Lines 3354-3360 CREATE TABLE categories_branches( -- association table between categories and br Link Here
3354
    branchcode VARCHAR(10),
3354
    branchcode VARCHAR(10),
3355
    FOREIGN KEY (categorycode) REFERENCES categories(categorycode) ON DELETE CASCADE,
3355
    FOREIGN KEY (categorycode) REFERENCES categories(categorycode) ON DELETE CASCADE,
3356
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3356
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3357
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3357
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3358
3358
3359
--
3359
--
3360
-- Table structure for table authorised_values_branches
3360
-- Table structure for table authorised_values_branches
Lines 3366-3372 CREATE TABLE authorised_values_branches( -- association table between authorised Link Here
3366
    branchcode VARCHAR(10) NOT NULL,
3366
    branchcode VARCHAR(10) NOT NULL,
3367
    FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE,
3367
    FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE,
3368
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3368
    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3369
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3369
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3370
3370
3371
3371
3372
--
3372
--
Lines 3379-3385 CREATE TABLE borrower_attribute_types_branches( -- association table between bor Link Here
3379
    b_branchcode VARCHAR(10),
3379
    b_branchcode VARCHAR(10),
3380
    FOREIGN KEY (bat_code) REFERENCES borrower_attribute_types(code) ON DELETE CASCADE,
3380
    FOREIGN KEY (bat_code) REFERENCES borrower_attribute_types(code) ON DELETE CASCADE,
3381
    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3381
    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
3382
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3382
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3383
3383
3384
--
3384
--
3385
-- Table structure for table `borrower_modifications`
3385
-- Table structure for table `borrower_modifications`
Lines 3455-3464 CREATE TABLE IF NOT EXISTS `borrower_modifications` ( Link Here
3455
  `smsalertnumber` varchar(50) DEFAULT NULL,
3455
  `smsalertnumber` varchar(50) DEFAULT NULL,
3456
  `privacy` int(11) DEFAULT NULL,
3456
  `privacy` int(11) DEFAULT NULL,
3457
  `extended_attributes` text DEFAULT NULL,
3457
  `extended_attributes` text DEFAULT NULL,
3458
  PRIMARY KEY (`verification_token`,`borrowernumber`),
3458
  PRIMARY KEY (`verification_token` (191),`borrowernumber`),
3459
  KEY `verification_token` (`verification_token`),
3459
  KEY `verification_token` (`verification_token` (191)),
3460
  KEY `borrowernumber` (`borrowernumber`)
3460
  KEY `borrowernumber` (`borrowernumber`)
3461
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3461
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3462
3462
3463
--
3463
--
3464
-- Table structure for table uploaded_files
3464
-- Table structure for table uploaded_files
Lines 3477-3483 CREATE TABLE uploaded_files ( Link Here
3477
    public tinyint,
3477
    public tinyint,
3478
    permanent tinyint,
3478
    permanent tinyint,
3479
    PRIMARY KEY (id)
3479
    PRIMARY KEY (id)
3480
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3480
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3481
3481
3482
--
3482
--
3483
-- Table structure for table linktracker
3483
-- Table structure for table linktracker
Lines 3497-3503 CREATE TABLE linktracker ( Link Here
3497
   KEY itemidx (itemnumber),
3497
   KEY itemidx (itemnumber),
3498
   KEY borridx (borrowernumber),
3498
   KEY borridx (borrowernumber),
3499
   KEY dateidx (timeclicked)
3499
   KEY dateidx (timeclicked)
3500
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3500
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3501
3501
3502
--
3502
--
3503
-- Table structure for table 'plugin_data'
3503
-- Table structure for table 'plugin_data'
Lines 3507-3514 CREATE TABLE IF NOT EXISTS plugin_data ( Link Here
3507
  plugin_class varchar(255) NOT NULL,
3507
  plugin_class varchar(255) NOT NULL,
3508
  plugin_key varchar(255) NOT NULL,
3508
  plugin_key varchar(255) NOT NULL,
3509
  plugin_value text,
3509
  plugin_value text,
3510
  PRIMARY KEY (plugin_class,plugin_key)
3510
  PRIMARY KEY ( `plugin_class` (191), `plugin_key` (191) )
3511
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3511
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3512
3512
3513
--
3513
--
3514
-- Table structure for table `patron_lists`
3514
-- Table structure for table `patron_lists`
Lines 3517-3527 CREATE TABLE IF NOT EXISTS plugin_data ( Link Here
3517
DROP TABLE IF EXISTS patron_lists;
3517
DROP TABLE IF EXISTS patron_lists;
3518
CREATE TABLE patron_lists (
3518
CREATE TABLE patron_lists (
3519
  patron_list_id int(11) NOT NULL AUTO_INCREMENT, -- unique identifier
3519
  patron_list_id int(11) NOT NULL AUTO_INCREMENT, -- unique identifier
3520
  name varchar(255) CHARACTER SET utf8 NOT NULL,  -- the list's name
3520
  name varchar(255) CHARACTER SET utf8mb4 NOT NULL,  -- the list's name
3521
  owner int(11) NOT NULL,                         -- borrowernumber of the list creator
3521
  owner int(11) NOT NULL,                         -- borrowernumber of the list creator
3522
  PRIMARY KEY (patron_list_id),
3522
  PRIMARY KEY (patron_list_id),
3523
  KEY owner (owner)
3523
  KEY owner (owner)
3524
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3524
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3525
3525
3526
--
3526
--
3527
-- Constraints for table `patron_lists`
3527
-- Constraints for table `patron_lists`
Lines 3541-3547 CREATE TABLE patron_list_patrons ( Link Here
3541
  PRIMARY KEY (patron_list_patron_id),
3541
  PRIMARY KEY (patron_list_patron_id),
3542
  KEY patron_list_id (patron_list_id),
3542
  KEY patron_list_id (patron_list_id),
3543
  KEY borrowernumber (borrowernumber)
3543
  KEY borrowernumber (borrowernumber)
3544
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3544
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3545
3545
3546
--
3546
--
3547
-- Constraints for table `patron_list_patrons`
3547
-- Constraints for table `patron_list_patrons`
Lines 3558-3564 CREATE TABLE IF NOT EXISTS marc_modification_templates ( Link Here
3558
    template_id int(11) NOT NULL AUTO_INCREMENT,
3558
    template_id int(11) NOT NULL AUTO_INCREMENT,
3559
    name text NOT NULL,
3559
    name text NOT NULL,
3560
    PRIMARY KEY (template_id)
3560
    PRIMARY KEY (template_id)
3561
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3561
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3562
3562
3563
--
3563
--
3564
-- Table structure for table 'marc_modification_template_actions'
3564
-- Table structure for table 'marc_modification_template_actions'
Lines 3587-3593 CREATE TABLE IF NOT EXISTS marc_modification_template_actions ( Link Here
3587
  description text,
3587
  description text,
3588
  PRIMARY KEY (mmta_id),
3588
  PRIMARY KEY (mmta_id),
3589
  CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
3589
  CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
3590
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3590
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3591
3591
3592
--
3592
--
3593
-- Table structure for table `misc_files`
3593
-- Table structure for table `misc_files`
Lines 3605-3611 CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec Link Here
3605
  PRIMARY KEY (`file_id`),
3605
  PRIMARY KEY (`file_id`),
3606
  KEY `table_tag` (`table_tag`),
3606
  KEY `table_tag` (`table_tag`),
3607
  KEY `record_id` (`record_id`)
3607
  KEY `record_id` (`record_id`)
3608
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3608
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3609
3609
3610
--
3610
--
3611
-- Table structure for table `columns_settings`
3611
-- Table structure for table `columns_settings`
Lines 3618-3625 CREATE TABLE IF NOT EXISTS columns_settings ( Link Here
3618
    columnname varchar(255) NOT NULL,
3618
    columnname varchar(255) NOT NULL,
3619
    cannot_be_toggled int(1) NOT NULL DEFAULT 0,
3619
    cannot_be_toggled int(1) NOT NULL DEFAULT 0,
3620
    is_hidden int(1) NOT NULL DEFAULT 0,
3620
    is_hidden int(1) NOT NULL DEFAULT 0,
3621
    PRIMARY KEY(module, page, tablename, columnname)
3621
    PRIMARY KEY(module (191), page (191), tablename (191), columnname (191))
3622
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3622
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3623
3623
3624
--
3624
--
3625
-- Table structure for table 'items_search_fields'
3625
-- Table structure for table 'items_search_fields'
Lines 3632-3642 CREATE TABLE items_search_fields ( Link Here
3632
  tagfield CHAR(3) NOT NULL,
3632
  tagfield CHAR(3) NOT NULL,
3633
  tagsubfield CHAR(1) NULL DEFAULT NULL,
3633
  tagsubfield CHAR(1) NULL DEFAULT NULL,
3634
  authorised_values_category VARCHAR(32) NULL DEFAULT NULL,
3634
  authorised_values_category VARCHAR(32) NULL DEFAULT NULL,
3635
  PRIMARY KEY(name),
3635
  PRIMARY KEY(name (191)),
3636
  CONSTRAINT items_search_fields_authorised_values_category
3636
  CONSTRAINT items_search_fields_authorised_values_category
3637
    FOREIGN KEY (authorised_values_category) REFERENCES authorised_value_categories (category_name)
3637
    FOREIGN KEY (authorised_values_category) REFERENCES authorised_value_categories (category_name)
3638
    ON DELETE SET NULL ON UPDATE CASCADE
3638
    ON DELETE SET NULL ON UPDATE CASCADE
3639
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3639
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3640
3640
3641
--
3641
--
3642
-- Table structure for table 'discharges'
3642
-- Table structure for table 'discharges'
Lines 3651-3657 CREATE TABLE discharges ( Link Here
3651
  PRIMARY KEY (discharge_id),
3651
  PRIMARY KEY (discharge_id),
3652
  KEY borrower_discharges_ibfk1 (borrower),
3652
  KEY borrower_discharges_ibfk1 (borrower),
3653
  CONSTRAINT borrower_discharges_ibfk1 FOREIGN KEY (borrower) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
3653
  CONSTRAINT borrower_discharges_ibfk1 FOREIGN KEY (borrower) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE
3654
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3654
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3655
3655
3656
--
3656
--
3657
-- Table structure for table additional_fields
3657
-- Table structure for table additional_fields
Lines 3667-3674 CREATE TABLE `additional_fields` ( Link Here
3667
  `marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record
3667
  `marcfield` varchar(16) NOT NULL DEFAULT '', -- contains the marc field to copied into the record
3668
  `searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable?
3668
  `searchable` tinyint(1) NOT NULL DEFAULT '0', -- is the field searchable?
3669
  PRIMARY KEY (`id`),
3669
  PRIMARY KEY (`id`),
3670
  UNIQUE KEY `fields_uniq` (`tablename`,`name`)
3670
  UNIQUE KEY `fields_uniq` (`tablename` (191),`name` (191))
3671
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3671
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3672
3672
3673
--
3673
--
3674
-- Table structure for table additional_field_values
3674
-- Table structure for table additional_field_values
Lines 3684-3690 CREATE TABLE `additional_field_values` ( Link Here
3684
  PRIMARY KEY (`id`),
3684
  PRIMARY KEY (`id`),
3685
  UNIQUE KEY `field_record` (`field_id`,`record_id`),
3685
  UNIQUE KEY `field_record` (`field_id`,`record_id`),
3686
  CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
3686
  CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
3687
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3687
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3688
3688
3689
--
3689
--
3690
-- Table structure for table 'localization'
3690
-- Table structure for table 'localization'
Lines 3693-3705 CREATE TABLE `additional_field_values` ( Link Here
3693
DROP TABLE IF EXISTS localization;
3693
DROP TABLE IF EXISTS localization;
3694
CREATE TABLE `localization` (
3694
CREATE TABLE `localization` (
3695
      localization_id int(11) NOT NULL AUTO_INCREMENT,
3695
      localization_id int(11) NOT NULL AUTO_INCREMENT,
3696
      entity varchar(16) COLLATE utf8_unicode_ci NOT NULL,
3696
      entity varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
3697
      code varchar(64) COLLATE utf8_unicode_ci NOT NULL,
3697
      code varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
3698
      lang varchar(25) COLLATE utf8_unicode_ci NOT NULL, -- could be a foreign key
3698
      lang varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, -- could be a foreign key
3699
      translation text COLLATE utf8_unicode_ci,
3699
      translation text COLLATE utf8mb4_unicode_ci,
3700
      PRIMARY KEY (localization_id),
3700
      PRIMARY KEY (localization_id),
3701
      UNIQUE KEY `entity_code_lang` (`entity`,`code`,`lang`)
3701
      UNIQUE KEY `entity_code_lang` (`entity`,`code`,`lang`)
3702
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3702
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3703
3703
3704
--
3704
--
3705
-- Table structure for table 'audio_alerts'
3705
-- Table structure for table 'audio_alerts'
Lines 3713-3719 CREATE TABLE audio_alerts ( Link Here
3713
  sound varchar(255) NOT NULL,
3713
  sound varchar(255) NOT NULL,
3714
  PRIMARY KEY (id),
3714
  PRIMARY KEY (id),
3715
  KEY precedence (precedence)
3715
  KEY precedence (precedence)
3716
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3716
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3717
3717
3718
--
3718
--
3719
-- Table structure for table 'edifact_ean'
3719
-- Table structure for table 'edifact_ean'
Lines 3727-3733 CREATE TABLE IF NOT EXISTS edifact_ean ( Link Here
3727
  ean VARCHAR(15) NOT NULL,
3727
  ean VARCHAR(15) NOT NULL,
3728
  id_code_qualifier VARCHAR(3) NOT NULL DEFAULT '14',
3728
  id_code_qualifier VARCHAR(3) NOT NULL DEFAULT '14',
3729
  CONSTRAINT efk_branchcode FOREIGN KEY ( branchcode ) REFERENCES branches ( branchcode )
3729
  CONSTRAINT efk_branchcode FOREIGN KEY ( branchcode ) REFERENCES branches ( branchcode )
3730
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3730
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3731
3731
3732
--
3732
--
3733
-- Table structure for table `courses`
3733
-- Table structure for table `courses`
Lines 3750-3756 CREATE TABLE `courses` ( Link Here
3750
  `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', -- determines whether the course is active
3750
  `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', -- determines whether the course is active
3751
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
3751
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
3752
   PRIMARY KEY (`course_id`)
3752
   PRIMARY KEY (`course_id`)
3753
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3753
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3754
3754
3755
--
3755
--
3756
-- Table structure for table `course_instructors`
3756
-- Table structure for table `course_instructors`
Lines 3766-3772 CREATE TABLE `course_instructors` ( Link Here
3766
  `borrowernumber` int(11) NOT NULL, -- foreign key to link to borrowers.borrowernumber for instructor information
3766
  `borrowernumber` int(11) NOT NULL, -- foreign key to link to borrowers.borrowernumber for instructor information
3767
  PRIMARY KEY (`course_id`,`borrowernumber`),
3767
  PRIMARY KEY (`course_id`,`borrowernumber`),
3768
  KEY `borrowernumber` (`borrowernumber`)
3768
  KEY `borrowernumber` (`borrowernumber`)
3769
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3769
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3770
3770
3771
--
3771
--
3772
-- Constraints for table `course_instructors`
3772
-- Constraints for table `course_instructors`
Lines 3796-3802 CREATE TABLE `course_items` ( Link Here
3796
   PRIMARY KEY (`ci_id`),
3796
   PRIMARY KEY (`ci_id`),
3797
   UNIQUE KEY `itemnumber` (`itemnumber`),
3797
   UNIQUE KEY `itemnumber` (`itemnumber`),
3798
   KEY `holdingbranch` (`holdingbranch`)
3798
   KEY `holdingbranch` (`holdingbranch`)
3799
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3799
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3800
3800
3801
--
3801
--
3802
-- Constraints for table `course_items`
3802
-- Constraints for table `course_items`
Lines 3823-3829 CREATE TABLE `course_reserves` ( Link Here
3823
   PRIMARY KEY (`cr_id`),
3823
   PRIMARY KEY (`cr_id`),
3824
   UNIQUE KEY `pseudo_key` (`course_id`,`ci_id`),
3824
   UNIQUE KEY `pseudo_key` (`course_id`,`ci_id`),
3825
   KEY `course_id` (`course_id`)
3825
   KEY `course_id` (`course_id`)
3826
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3826
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3827
3827
3828
--
3828
--
3829
-- Constraints for table `course_reserves`
3829
-- Constraints for table `course_reserves`
Lines 3853-3859 CREATE TABLE `hold_fill_targets` ( Link Here
3853
    REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
3853
    REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
3854
  CONSTRAINT `hold_fill_targets_ibfk_4` FOREIGN KEY (`source_branchcode`)
3854
  CONSTRAINT `hold_fill_targets_ibfk_4` FOREIGN KEY (`source_branchcode`)
3855
    REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3855
    REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
3856
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3856
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3857
3857
3858
--
3858
--
3859
-- Table structure for table `housebound_profile`
3859
-- Table structure for table `housebound_profile`
Lines 3874-3880 CREATE TABLE `housebound_profile` ( Link Here
3874
    FOREIGN KEY (`borrowernumber`)
3874
    FOREIGN KEY (`borrowernumber`)
3875
    REFERENCES `borrowers` (`borrowernumber`)
3875
    REFERENCES `borrowers` (`borrowernumber`)
3876
    ON UPDATE CASCADE ON DELETE CASCADE
3876
    ON UPDATE CASCADE ON DELETE CASCADE
3877
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3877
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3878
3878
3879
--
3879
--
3880
-- Table structure for table `housebound_visit`
3880
-- Table structure for table `housebound_visit`
Lines 3901-3907 CREATE TABLE `housebound_visit` ( Link Here
3901
    FOREIGN KEY (`deliverer_brwnumber`)
3901
    FOREIGN KEY (`deliverer_brwnumber`)
3902
    REFERENCES `borrowers` (`borrowernumber`)
3902
    REFERENCES `borrowers` (`borrowernumber`)
3903
    ON UPDATE CASCADE ON DELETE CASCADE
3903
    ON UPDATE CASCADE ON DELETE CASCADE
3904
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3904
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3905
3905
3906
--
3906
--
3907
-- Table structure for table `housebound_role`
3907
-- Table structure for table `housebound_role`
Lines 3917-3923 CREATE TABLE IF NOT EXISTS `housebound_role` ( Link Here
3917
    FOREIGN KEY (`borrowernumber_id`)
3917
    FOREIGN KEY (`borrowernumber_id`)
3918
    REFERENCES `borrowers` (`borrowernumber`)
3918
    REFERENCES `borrowers` (`borrowernumber`)
3919
    ON UPDATE CASCADE ON DELETE CASCADE
3919
    ON UPDATE CASCADE ON DELETE CASCADE
3920
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3920
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3921
3921
3922
--
3922
--
3923
-- Table structure for table 'article_requests'
3923
-- Table structure for table 'article_requests'
Lines 3929-3935 CREATE TABLE `article_requests` ( Link Here
3929
  `borrowernumber` int(11) NOT NULL,
3929
  `borrowernumber` int(11) NOT NULL,
3930
  `biblionumber` int(11) NOT NULL,
3930
  `biblionumber` int(11) NOT NULL,
3931
  `itemnumber` int(11) DEFAULT NULL,
3931
  `itemnumber` int(11) DEFAULT NULL,
3932
  `branchcode` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
3932
  `branchcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
3933
  `title` text,
3933
  `title` text,
3934
  `author` text,
3934
  `author` text,
3935
  `volume` text,
3935
  `volume` text,
Lines 3951-3957 CREATE TABLE `article_requests` ( Link Here
3951
  CONSTRAINT `article_requests_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
3951
  CONSTRAINT `article_requests_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
3952
  CONSTRAINT `article_requests_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE,
3952
  CONSTRAINT `article_requests_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE,
3953
  CONSTRAINT `article_requests_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE
3953
  CONSTRAINT `article_requests_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE
3954
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3954
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3955
3955
3956
--
3956
--
3957
-- Table structure for table `biblio_metadata`
3957
-- Table structure for table `biblio_metadata`
Lines 3969-3975 CREATE TABLE biblio_metadata ( Link Here
3969
    UNIQUE KEY `biblio_metadata_uniq_key` (`biblionumber`,`format`,`marcflavour`),
3969
    UNIQUE KEY `biblio_metadata_uniq_key` (`biblionumber`,`format`,`marcflavour`),
3970
    CONSTRAINT `record_metadata_fk_1` FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE,
3970
    CONSTRAINT `record_metadata_fk_1` FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE,
3971
    KEY `timestamp` (`timestamp`)
3971
    KEY `timestamp` (`timestamp`)
3972
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3972
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3973
3973
3974
--
3974
--
3975
-- Table structure for table `deletedbiblio_metadata`
3975
-- Table structure for table `deletedbiblio_metadata`
Lines 3987-3993 CREATE TABLE deletedbiblio_metadata ( Link Here
3987
    UNIQUE KEY `deletedbiblio_metadata_uniq_key` (`biblionumber`,`format`,`marcflavour`),
3987
    UNIQUE KEY `deletedbiblio_metadata_uniq_key` (`biblionumber`,`format`,`marcflavour`),
3988
    CONSTRAINT `deletedrecord_metadata_fk_1` FOREIGN KEY (biblionumber) REFERENCES deletedbiblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE,
3988
    CONSTRAINT `deletedrecord_metadata_fk_1` FOREIGN KEY (biblionumber) REFERENCES deletedbiblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE,
3989
    KEY `timestamp` (`timestamp`)
3989
    KEY `timestamp` (`timestamp`)
3990
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
3990
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3991
3991
3992
--
3992
--
3993
-- Table structure for table 'club_templates'
3993
-- Table structure for table 'club_templates'
Lines 4006-4012 CREATE TABLE IF NOT EXISTS club_templates ( Link Here
4006
  PRIMARY KEY (id),
4006
  PRIMARY KEY (id),
4007
  KEY ct_branchcode (branchcode),
4007
  KEY ct_branchcode (branchcode),
4008
  CONSTRAINT `club_templates_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
4008
  CONSTRAINT `club_templates_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
4009
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4009
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4010
4010
4011
--
4011
--
4012
-- Table structure for table 'clubs'
4012
-- Table structure for table 'clubs'
Lines 4027-4033 CREATE TABLE IF NOT EXISTS clubs ( Link Here
4027
  KEY branchcode (branchcode),
4027
  KEY branchcode (branchcode),
4028
  CONSTRAINT clubs_ibfk_1 FOREIGN KEY (club_template_id) REFERENCES club_templates (id) ON DELETE CASCADE ON UPDATE CASCADE,
4028
  CONSTRAINT clubs_ibfk_1 FOREIGN KEY (club_template_id) REFERENCES club_templates (id) ON DELETE CASCADE ON UPDATE CASCADE,
4029
  CONSTRAINT clubs_ibfk_2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
4029
  CONSTRAINT clubs_ibfk_2 FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
4030
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4030
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4031
4031
4032
--
4032
--
4033
-- Table structure for table 'club_enrollments'
4033
-- Table structure for table 'club_enrollments'
Lines 4049-4055 CREATE TABLE IF NOT EXISTS club_enrollments ( Link Here
4049
  CONSTRAINT club_enrollments_ibfk_1 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE,
4049
  CONSTRAINT club_enrollments_ibfk_1 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE,
4050
  CONSTRAINT club_enrollments_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
4050
  CONSTRAINT club_enrollments_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
4051
  CONSTRAINT club_enrollments_ibfk_3 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE
4051
  CONSTRAINT club_enrollments_ibfk_3 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE
4052
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4052
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4053
4053
4054
--
4054
--
4055
-- Table structure for table 'club_template_enrollment_fields'
4055
-- Table structure for table 'club_template_enrollment_fields'
Lines 4064-4070 CREATE TABLE IF NOT EXISTS club_template_enrollment_fields ( Link Here
4064
  PRIMARY KEY (id),
4064
  PRIMARY KEY (id),
4065
  KEY club_template_id (club_template_id),
4065
  KEY club_template_id (club_template_id),
4066
  CONSTRAINT club_template_enrollment_fields_ibfk_1 FOREIGN KEY (club_template_id) REFERENCES club_templates (id) ON DELETE CASCADE ON UPDATE CASCADE
4066
  CONSTRAINT club_template_enrollment_fields_ibfk_1 FOREIGN KEY (club_template_id) REFERENCES club_templates (id) ON DELETE CASCADE ON UPDATE CASCADE
4067
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4067
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4068
4068
4069
--
4069
--
4070
-- Table structure for table 'club_enrollment_fields'
4070
-- Table structure for table 'club_enrollment_fields'
Lines 4080-4086 CREATE TABLE IF NOT EXISTS club_enrollment_fields ( Link Here
4080
  KEY club_template_enrollment_field_id (club_template_enrollment_field_id),
4080
  KEY club_template_enrollment_field_id (club_template_enrollment_field_id),
4081
  CONSTRAINT club_enrollment_fields_ibfk_1 FOREIGN KEY (club_enrollment_id) REFERENCES club_enrollments (id) ON DELETE CASCADE ON UPDATE CASCADE,
4081
  CONSTRAINT club_enrollment_fields_ibfk_1 FOREIGN KEY (club_enrollment_id) REFERENCES club_enrollments (id) ON DELETE CASCADE ON UPDATE CASCADE,
4082
  CONSTRAINT club_enrollment_fields_ibfk_2 FOREIGN KEY (club_template_enrollment_field_id) REFERENCES club_template_enrollment_fields (id) ON DELETE CASCADE ON UPDATE CASCADE
4082
  CONSTRAINT club_enrollment_fields_ibfk_2 FOREIGN KEY (club_template_enrollment_field_id) REFERENCES club_template_enrollment_fields (id) ON DELETE CASCADE ON UPDATE CASCADE
4083
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4083
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4084
4084
4085
--
4085
--
4086
-- Table structure for table 'club_template_fields'
4086
-- Table structure for table 'club_template_fields'
Lines 4095-4101 CREATE TABLE IF NOT EXISTS club_template_fields ( Link Here
4095
  PRIMARY KEY (id),
4095
  PRIMARY KEY (id),
4096
  KEY club_template_id (club_template_id),
4096
  KEY club_template_id (club_template_id),
4097
  CONSTRAINT club_template_fields_ibfk_1 FOREIGN KEY (club_template_id) REFERENCES club_templates (id) ON DELETE CASCADE ON UPDATE CASCADE
4097
  CONSTRAINT club_template_fields_ibfk_1 FOREIGN KEY (club_template_id) REFERENCES club_templates (id) ON DELETE CASCADE ON UPDATE CASCADE
4098
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4098
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4099
4099
4100
--
4100
--
4101
-- Table structure for table 'club_fields'
4101
-- Table structure for table 'club_fields'
Lines 4111-4117 CREATE TABLE IF NOT EXISTS club_fields ( Link Here
4111
  KEY club_id (club_id),
4111
  KEY club_id (club_id),
4112
  CONSTRAINT club_fields_ibfk_3 FOREIGN KEY (club_template_field_id) REFERENCES club_template_fields (id) ON DELETE CASCADE ON UPDATE CASCADE,
4112
  CONSTRAINT club_fields_ibfk_3 FOREIGN KEY (club_template_field_id) REFERENCES club_template_fields (id) ON DELETE CASCADE ON UPDATE CASCADE,
4113
  CONSTRAINT club_fields_ibfk_4 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE
4113
  CONSTRAINT club_fields_ibfk_4 FOREIGN KEY (club_id) REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE
4114
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4114
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4115
4115
4116
--
4116
--
4117
-- Table structure for table `illrequests`
4117
-- Table structure for table `illrequests`
Lines 4144-4150 CREATE TABLE illrequests ( Link Here
4144
      FOREIGN KEY (`branchcode`)
4144
      FOREIGN KEY (`branchcode`)
4145
      REFERENCES `branches` (`branchcode`)
4145
      REFERENCES `branches` (`branchcode`)
4146
      ON UPDATE CASCADE ON DELETE CASCADE
4146
      ON UPDATE CASCADE ON DELETE CASCADE
4147
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4147
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4148
4148
4149
--
4149
--
4150
-- Table structure for table `illrequestattributes`
4150
-- Table structure for table `illrequestattributes`
Lines 4155-4166 CREATE TABLE illrequestattributes ( Link Here
4155
    illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number
4155
    illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number
4156
    type varchar(200) NOT NULL,                 -- API ILL property name
4156
    type varchar(200) NOT NULL,                 -- API ILL property name
4157
    value text NOT NULL,                        -- API ILL property value
4157
    value text NOT NULL,                        -- API ILL property value
4158
    PRIMARY KEY  (`illrequest_id`,`type`),
4158
    PRIMARY KEY  (`illrequest_id`, `type` (191)),
4159
    CONSTRAINT `illrequestattributes_ifk`
4159
    CONSTRAINT `illrequestattributes_ifk`
4160
      FOREIGN KEY (illrequest_id)
4160
      FOREIGN KEY (illrequest_id)
4161
      REFERENCES `illrequests` (`illrequest_id`)
4161
      REFERENCES `illrequests` (`illrequest_id`)
4162
      ON UPDATE CASCADE ON DELETE CASCADE
4162
      ON UPDATE CASCADE ON DELETE CASCADE
4163
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
4163
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4164
4164
4165
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4165
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4166
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4166
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4167
- 

Return to bug 18336