From c2b33e4c56b603c610cb9473faff3ebe0b50c889 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 11 Apr 2023 17:46:09 +0000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- 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 diff --git a/installer/data/mysql/atomicupdate/bz_33488.pl b/installer/data/mysql/atomicupdate/bz_33488.pl new file mode 100755 index 0000000000..514f737e84 --- /dev/null +++ b/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"; + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index f07319c42a..882e051fef 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1549,7 +1549,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 */; -- 2.39.5