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

(-)a/installer/data/mysql/atomicupdate/bug_35610.pl (-1 / +6 lines)
Lines 8-13 return { Link Here
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
10
        unless ( foreign_key_exists('old_reserves', 'old_reserves_ibfk_branchcode') ) {
10
        unless ( foreign_key_exists('old_reserves', 'old_reserves_ibfk_branchcode') ) {
11
            $dbh->do(q{
12
                UPDATE old_reserves
13
                SET branchcode = NULL
14
                WHERE branchcode NOT IN (SELECT branchcode FROM branches)
15
            });
16
11
            $dbh->do(q{
17
            $dbh->do(q{
12
                ALTER TABLE old_reserves
18
                ALTER TABLE old_reserves
13
                ADD CONSTRAINT `old_reserves_ibfk_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE;
19
                ADD CONSTRAINT `old_reserves_ibfk_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE;
14
- 

Return to bug 35610