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

(-)a/installer/data/mysql/atomicupdate/bug_40529_-_hold_group_table_target.pl (-4 / +6 lines)
Lines 11-20 return { Link Here
11
        unless ( TableExists('hold_group_target_holds') ) {
11
        unless ( TableExists('hold_group_target_holds') ) {
12
            $dbh->do(
12
            $dbh->do(
13
                q{
13
                q{
14
                    CREATE TABLE hold_group_target_holds (
14
                    CREATE TABLE `hold_group_target_holds` (
15
                        `hold_group_id` int unsigned NOT NULL UNIQUE COMMENT 'foreign key, linking this to the hold_groups table',
15
                        `hold_group_id` int(10) unsigned NOT NULL COMMENT 'foreign key, linking this to the hold_groups table',
16
                        `reserve_id` int(11) DEFAULT NULL UNIQUE COMMENT 'foreign key, linking this to the reserves table',
16
                        `reserve_id` int(11) NOT NULL COMMENT 'foreign key, linking this to the reserves table',
17
                        PRIMARY KEY (`hold_group_id`, `reserve_id`),
17
                        PRIMARY KEY (`hold_group_id`,`reserve_id`),
18
                        UNIQUE KEY `uq_hold_group_target_holds_hold_group_id` (`hold_group_id`),
19
                        UNIQUE KEY `uq_hold_group_target_holds_reserve_id` (`reserve_id`),
18
                        CONSTRAINT `hold_group_target_holds_ibfk_1` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE CASCADE,
20
                        CONSTRAINT `hold_group_target_holds_ibfk_1` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE CASCADE,
19
                        CONSTRAINT `hold_group_target_holds_ibfk_2` FOREIGN KEY (`reserve_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE
21
                        CONSTRAINT `hold_group_target_holds_ibfk_2` FOREIGN KEY (`reserve_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE
20
                    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
22
                    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
(-)a/installer/data/mysql/kohastructure.sql (-6 / +7 lines)
Lines 5118-5128 CREATE TABLE `old_issues` ( Link Here
5118
--
5118
--
5119
DROP TABLE IF EXISTS `hold_group_target_holds`;
5119
DROP TABLE IF EXISTS `hold_group_target_holds`;
5120
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5120
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5121
/*!40101 SET character_set_client = utf8 */;
5121
/*!40101 SET character_set_client = utf8mb4 */;
5122
CREATE TABLE hold_group_target_holds (
5122
CREATE TABLE `hold_group_target_holds` (
5123
    `hold_group_id` int unsigned NOT NULL UNIQUE COMMENT 'foreign key, linking this to the hold_groups table',
5123
    `hold_group_id` int(10) unsigned NOT NULL COMMENT 'foreign key, linking this to the hold_groups table',
5124
    `reserve_id` int(11) DEFAULT NULL UNIQUE COMMENT 'foreign key, linking this to the reserves table',
5124
    `reserve_id` int(11) NOT NULL COMMENT 'foreign key, linking this to the reserves table',
5125
    PRIMARY KEY (`hold_group_id`, `reserve_id`),
5125
    PRIMARY KEY (`hold_group_id`,`reserve_id`),
5126
    UNIQUE KEY `uq_hold_group_target_holds_hold_group_id` (`hold_group_id`),
5127
    UNIQUE KEY `uq_hold_group_target_holds_reserve_id` (`reserve_id`),
5126
    CONSTRAINT `hold_group_target_holds_ibfk_1` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE CASCADE,
5128
    CONSTRAINT `hold_group_target_holds_ibfk_1` FOREIGN KEY (`hold_group_id`) REFERENCES `hold_groups` (`hold_group_id`) ON DELETE CASCADE,
5127
    CONSTRAINT `hold_group_target_holds_ibfk_2` FOREIGN KEY (`reserve_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE
5129
    CONSTRAINT `hold_group_target_holds_ibfk_2` FOREIGN KEY (`reserve_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE
5128
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5130
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5129
- 

Return to bug 40529