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

(-)a/installer/data/mysql/atomicupdate/bug_36033.pl (+28 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "36033",
5
    description => "Add more indexes to pseudonymized_transactions",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        unless ( index_exists( 'pseudonymized_transactions', 'pseudonymized_transactions_items_ibfk_4' ) ) {
10
            $dbh->do(q{
11
                ALTER TABLE `pseudonymized_transactions` ADD INDEX `pseudonymized_transactions_items_ibfk_4` (`itemnumber`)
12
            });
13
            say $out "Added new index on pseudonymized_transactions.itemnumber";
14
        }
15
        unless ( index_exists( 'pseudonymized_transactions', 'pseudonymized_transactions_ibfk_5' ) ) {
16
            $dbh->do(q{
17
                ALTER TABLE `pseudonymized_transactions` ADD INDEX `pseudonymized_transactions_ibfk_5` (`transaction_type`)
18
            });
19
            say $out "Added new index on pseudonymized_transactions.transaction_type";
20
        }
21
        unless ( index_exists( 'pseudonymized_transactions', 'pseudonymized_transactions_ibfk_6' ) ) {
22
            $dbh->do(q{
23
                ALTER TABLE `pseudonymized_transactions` ADD INDEX `pseudonymized_transactions_ibfk_6` (`datetime`)
24
            });
25
            say $out "Added new index on pseudonymized_transactions.datetime";
26
        }
27
    },
28
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +4 lines)
Lines 5307-5313 CREATE TABLE `pseudonymized_transactions` ( Link Here
5307
  PRIMARY KEY (`id`),
5307
  PRIMARY KEY (`id`),
5308
  KEY `pseudonymized_transactions_ibfk_1` (`categorycode`),
5308
  KEY `pseudonymized_transactions_ibfk_1` (`categorycode`),
5309
  KEY `pseudonymized_transactions_borrowers_ibfk_2` (`branchcode`),
5309
  KEY `pseudonymized_transactions_borrowers_ibfk_2` (`branchcode`),
5310
  KEY `pseudonymized_transactions_borrowers_ibfk_3` (`transaction_branchcode`)
5310
  KEY `pseudonymized_transactions_borrowers_ibfk_3` (`transaction_branchcode`),
5311
  KEY `pseudonymized_transactions_items_ibfk_4` (`itemnumber`),
5312
  KEY `pseudonymized_transactions_ibfk_5` (`transaction_type`),
5313
  KEY `pseudonymized_transactions_ibfk_6` (`datetime`)
5311
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5314
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5312
/*!40101 SET character_set_client = @saved_cs_client */;
5315
/*!40101 SET character_set_client = @saved_cs_client */;
5313
5316
5314
- 

Return to bug 36033