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

(-)a/installer/data/mysql/atomicupdate/bug_30852.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30852",
5
    description => "Add index to article_requests.debit_id",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless ( index_exists( 'article_requests', 'debit_id' ) ) {
10
            $dbh->do(q{
11
                ALTER TABLE `article_requests`
12
                ADD KEY `debit_id` (`debit_id`)
13
            });
14
        }
15
    },
16
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 798-803 CREATE TABLE `article_requests` ( Link Here
798
  KEY `biblionumber` (`biblionumber`),
798
  KEY `biblionumber` (`biblionumber`),
799
  KEY `itemnumber` (`itemnumber`),
799
  KEY `itemnumber` (`itemnumber`),
800
  KEY `branchcode` (`branchcode`),
800
  KEY `branchcode` (`branchcode`),
801
  KEY `debit_id` (`debit_id`),
801
  CONSTRAINT `article_requests_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
802
  CONSTRAINT `article_requests_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
802
  CONSTRAINT `article_requests_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
803
  CONSTRAINT `article_requests_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
803
  CONSTRAINT `article_requests_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE,
804
  CONSTRAINT `article_requests_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE,
804
- 

Return to bug 30852