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

(-)a/installer/data/mysql/db_revs/250600012.pl (-3 / +4 lines)
Lines 18-24 return { Link Here
18
18
19
        unless ( column_exists( 'reserves', 'hold_group_id' ) ) {
19
        unless ( column_exists( 'reserves', 'hold_group_id' ) ) {
20
            $dbh->do(
20
            $dbh->do(
21
                q{ALTER TABLE reserves ADD COLUMN hold_group_id int unsigned NULL DEFAULT NULL AFTER non_priority});
21
                q{ALTER TABLE reserves ADD COLUMN hold_group_id int unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked' AFTER non_priority}
22
            );
22
            $dbh->do(q{ALTER TABLE reserves ADD KEY reserves_ibfk_hg (hold_group_id)});
23
            $dbh->do(q{ALTER TABLE reserves ADD KEY reserves_ibfk_hg (hold_group_id)});
23
            $dbh->do(
24
            $dbh->do(
24
                q{ALTER TABLE reserves ADD CONSTRAINT reserves_ibfk_hg FOREIGN KEY (hold_group_id) REFERENCES hold_groups (hold_group_id) ON DELETE SET NULL ON UPDATE CASCADE}
25
                q{ALTER TABLE reserves ADD CONSTRAINT reserves_ibfk_hg FOREIGN KEY (hold_group_id) REFERENCES hold_groups (hold_group_id) ON DELETE SET NULL ON UPDATE CASCADE}
Lines 27-33 return { Link Here
27
28
28
        unless ( column_exists( 'old_reserves', 'hold_group_id' ) ) {
29
        unless ( column_exists( 'old_reserves', 'hold_group_id' ) ) {
29
            $dbh->do(
30
            $dbh->do(
30
                q{ALTER TABLE old_reserves ADD COLUMN hold_group_id int unsigned NULL DEFAULT NULL AFTER non_priority});
31
                q{ALTER TABLE old_reserves ADD COLUMN hold_group_id int unsigned NULL DEFAULT NULL COMMENT 'The id of a group of titles reservations fulfilled when one title is picked' AFTER non_priority}
32
            );
31
            $dbh->do(q{ALTER TABLE old_reserves ADD KEY old_reserves_ibfk_hg (hold_group_id)});
33
            $dbh->do(q{ALTER TABLE old_reserves ADD KEY old_reserves_ibfk_hg (hold_group_id)});
32
            $dbh->do(
34
            $dbh->do(
33
                q{ALTER TABLE old_reserves ADD CONSTRAINT old_reserves_ibfk_hg FOREIGN KEY (hold_group_id) REFERENCES hold_groups (hold_group_id) ON DELETE SET NULL ON UPDATE SET NULL}
35
                q{ALTER TABLE old_reserves ADD CONSTRAINT old_reserves_ibfk_hg FOREIGN KEY (hold_group_id) REFERENCES hold_groups (hold_group_id) ON DELETE SET NULL ON UPDATE SET NULL}
34
- 

Return to bug 15516