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

(-)a/installer/data/mysql/atomicupdate/bug_29495.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "29495",
5
    description => "Drop issue_id constraint from return_claims table",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        if ( foreign_key_exists( 'return_claims', 'issue_id' ) ) {
10
            $dbh->do(q{
11
                ALTER TABLE return_claims DROP FOREIGN KEY issue_id
12
            });
13
        }
14
    },
15
};
(-)a/installer/data/mysql/kohastructure.sql (-2 lines)
Lines 4388-4394 CREATE TABLE `return_claims` ( Link Here
4388
  KEY `rc_created_by_ibfk` (`created_by`),
4388
  KEY `rc_created_by_ibfk` (`created_by`),
4389
  KEY `rc_updated_by_ibfk` (`updated_by`),
4389
  KEY `rc_updated_by_ibfk` (`updated_by`),
4390
  KEY `rc_resolved_by_ibfk` (`resolved_by`),
4390
  KEY `rc_resolved_by_ibfk` (`resolved_by`),
4391
  CONSTRAINT `issue_id` FOREIGN KEY (`issue_id`) REFERENCES `issues` (`issue_id`) ON DELETE SET NULL ON UPDATE CASCADE,
4392
  CONSTRAINT `rc_borrowers_ibfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4391
  CONSTRAINT `rc_borrowers_ibfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4393
  CONSTRAINT `rc_created_by_ibfk` FOREIGN KEY (`created_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
4392
  CONSTRAINT `rc_created_by_ibfk` FOREIGN KEY (`created_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,
4394
  CONSTRAINT `rc_items_ibfk` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4393
  CONSTRAINT `rc_items_ibfk` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
4395
- 

Return to bug 29495