Bug 33488: Add fromBranch index to branch_transfer_limits

To test:
1 - Enable UseBranchTransferLimits by item type
2 - Set some limits for book
3 - Place a hold, verify that pikcup dropdown reflects the limits before and after patch

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-04-11 17:46:09 +00:00 committed by Tomas Cohen Arazi
parent 020bc275b0
commit c2b33e4c56
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 17 additions and 1 deletions

View file

@ -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";
}
},
};

View file

@ -1549,7 +1549,8 @@ CREATE TABLE `branch_transfer_limits` (
`fromBranch` varchar(10) NOT NULL, `fromBranch` varchar(10) NOT NULL,
`itemtype` varchar(10) DEFAULT NULL, `itemtype` varchar(10) DEFAULT NULL,
`ccode` varchar(80) 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; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;