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

(-)a/installer/data/mysql/atomicupdate/bug_18861.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    unless ( index_exists( 'branch_transfer_limits', 'itemtype_idx' ) ) {
4
        $dbh->do(q|
5
            ALTER TABLE branch_transfer_limits ADD KEY `itemtype_idx` (`itemtype`,`fromBranch`,`toBranch`);
6
        |);
7
    }
8
    unless ( index_exists( 'branch_transfer_limits', 'ccode_idx' ) ) {
9
        $dbh->do(q|
10
            ALTER TABLE branch_transfer_limits ADD KEY `ccode_idx` (`ccode`,`fromBranch`, `toBranch`);
11
        |);
12
    }
13
    NewVersion( $DBversion, 18861, "Add indexes for ccode and itemtype to branch_transfer_limits");
14
}
(-)a/installer/data/mysql/atomicupdate/bug_18861.sql (+2 lines)
Line 0 Link Here
1
ALTER TABLE branch_transfer_limits ADD KEY `itemtype_idx` (`itemtype`,`fromBranch`,`toBranch`);
2
ALTER TABLE branch_transfer_limits ADD KEY `ccode_idx` (`ccode`,`fromBranch`, `toBranch`);
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 2649-2654 CREATE TABLE branch_transfer_limits ( Link Here
2649
    itemtype varchar(10) NULL,
2649
    itemtype varchar(10) NULL,
2650
    ccode varchar(80) NULL,
2650
    ccode varchar(80) NULL,
2651
    PRIMARY KEY  (limitId)
2651
    PRIMARY KEY  (limitId)
2652
    KEY `itemtype_idx` (`itemtype`,`fromBranch`,`toBranch`),
2653
    KEY `ccode_idx` (`ccode`,`fromBranch`, `toBranch`)
2652
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2654
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2653
2655
2654
--
2656
--
2655
- 

Return to bug 18861