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.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2021-11-18 15:04:38 +00:00 committed by Tomas Cohen Arazi
parent d67e2e0511
commit d7a339d8b7
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 7 additions and 1 deletions

View file

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

View file

@ -4514,7 +4514,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`),