From 4db01aac2c2470ec916e85fa788abc3113e5253c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 18 Nov 2021 15:04:38 +0000 Subject: [PATCH] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue. --- installer/data/mysql/atomicupdate/bug_28854.pl | 7 +++++++ installer/data/mysql/kohastructure.sql | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_28854.pl b/installer/data/mysql/atomicupdate/bug_28854.pl index 381740e11e..d93fa9f49e 100644 --- a/installer/data/mysql/atomicupdate/bug_28854.pl +++ b/installer/data/mysql/atomicupdate/bug_28854.pl @@ -44,5 +44,12 @@ return { ( 'BundleNotLoanValue', $nfl_val, '', 'Sets the NOT_LOAN AV value that represents "Added to bundle" as a not for loan value', 'Free') }); say $out "System preferences added and set"; + + if( index_exists( 'return_claims', 'issue_id' ) ) { + $dbh->do(q{ + ALTER TABLE return_claims DROP INDEX issue_id + }); + say $out "Dropped unique constraint on issue_id in return_claims"; + } } } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 3ac04e07d6..f91836a392 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4462,7 +4462,6 @@ CREATE TABLE `return_claims` ( `resolved_on` timestamp NULL DEFAULT NULL COMMENT 'Time and date the claim was resolved', `resolved_by` int(11) DEFAULT NULL COMMENT 'ID of the staff member that resolved the claim', PRIMARY KEY (`id`), - UNIQUE KEY `issue_id` (`issue_id`), KEY `itemnumber` (`itemnumber`), KEY `rc_borrowers_ibfk` (`borrowernumber`), KEY `rc_created_by_ibfk` (`created_by`), -- 2.20.1