From b7f63f6a0fac0a8a7b5c1f7ccde0c28abdf7aa83 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.perl | 7 +++++++ installer/data/mysql/kohastructure.sql | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_28854.perl b/installer/data/mysql/atomicupdate/bug_28854.perl index 381740e11e..d93fa9f49e 100644 --- a/installer/data/mysql/atomicupdate/bug_28854.perl +++ b/installer/data/mysql/atomicupdate/bug_28854.perl @@ -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 e6e2f5b4d1..3426a73ec6 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4405,7 +4405,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