View | Details | Raw Unified | Return to bug 28854
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_28854.pl (+17 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "28854",
5
    description => "Add new unique index to return claims",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        if ( !unique_key_exists('return_claims', 'item_issue') ) {
10
            $dbh->do(q{
11
                ALTER TABLE return_claims
12
                ADD UNIQUE KEY item_issue (`itemnumber`,`issue_id`)
13
            });
14
            say $out "item_issue index added to return_claims";
15
        }
16
    },
17
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 4514-4519 CREATE TABLE `return_claims` ( Link Here
4514
  `resolved_on` timestamp NULL DEFAULT NULL COMMENT 'Time and date the claim was resolved',
4514
  `resolved_on` timestamp NULL DEFAULT NULL COMMENT 'Time and date the claim was resolved',
4515
  `resolved_by` int(11) DEFAULT NULL COMMENT 'ID of the staff member that resolved the claim',
4515
  `resolved_by` int(11) DEFAULT NULL COMMENT 'ID of the staff member that resolved the claim',
4516
  PRIMARY KEY (`id`),
4516
  PRIMARY KEY (`id`),
4517
  UNIQUE KEY `item_issue` (`itemnumber`, `issue_id`),
4517
  KEY `itemnumber` (`itemnumber`),
4518
  KEY `itemnumber` (`itemnumber`),
4518
  KEY `rc_borrowers_ibfk` (`borrowernumber`),
4519
  KEY `rc_borrowers_ibfk` (`borrowernumber`),
4519
  KEY `rc_created_by_ibfk` (`created_by`),
4520
  KEY `rc_created_by_ibfk` (`created_by`),
4520
- 

Return to bug 28854