@@ -, +, @@ --- installer/data/mysql/atomicupdate/bz_33488.pl | 15 +++++++++++++++ installer/data/mysql/kohastructure.sql | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bz_33488.pl --- a/installer/data/mysql/atomicupdate/bz_33488.pl +++ a/installer/data/mysql/atomicupdate/bz_33488.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "33488", + description => "Add index to fromBranch for branch_transfer_limits", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + unless ( index_exists( 'branch_transfer_limits', 'fromBranch_idx' ) ) { + $dbh->do(q{CREATE INDEX fromBranch_idx ON branch_transfer_limits ( fromBranch )}); + say $out "Added new index on branch_transfer_limits.fromBranch"; + } + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1510,7 +1510,8 @@ CREATE TABLE `branch_transfer_limits` ( `fromBranch` varchar(10) NOT NULL, `itemtype` varchar(10) DEFAULT NULL, `ccode` varchar(80) DEFAULT NULL, - PRIMARY KEY (`limitId`) + PRIMARY KEY (`limitId`), + KEY `fromBranch_index` (`fromBranch`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --