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

(-)a/installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl (-2 / +2 lines)
Lines 4-10 if( CheckVersion( $DBversion ) ) { Link Here
4
        $dbh->do(q{
4
        $dbh->do(q{
5
                 ALTER TABLE reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
5
                 ALTER TABLE reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
6
                 ADD KEY desk_id (`desk_id`),
6
                 ADD KEY desk_id (`desk_id`),
7
                 ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE ;
7
                 ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE ;
8
                 });
8
                 });
9
        $dbh->do(q{
9
        $dbh->do(q{
10
                 ALTER TABLE old_reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
10
                 ALTER TABLE old_reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode,
Lines 12-17 if( CheckVersion( $DBversion ) ) { Link Here
12
                 });
12
                 });
13
13
14
        SetVersion( $DBversion );
14
        SetVersion( $DBversion );
15
        print "Upgrade to $DBversion done (Bug XXXXX - Attach waiting reserve to desk)\n";
15
        print "Upgrade to $DBversion done (Bug 24412 - Attach waiting reserve to desk)\n";
16
    }
16
    }
17
}
17
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 1792-1798 CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha Link Here
1792
  CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1792
  CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
1793
  CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1793
  CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE,
1794
  CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE,
1794
  CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE,
1795
  CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE
1795
  CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE
1796
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1796
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1797
1797
1798
--
1798
--
1799
- 

Return to bug 24412