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

(-)a/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl (-1 / +26 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
3
4
return {
5
    bug_number  => "36330",
6
    description => "Fix typo 'reseve' in COMMENTs for table  course_items",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Update columns, only changing the COMMENT
12
        my $affected1 = $dbh->do(q{ ALTER TABLE course_items MODIFY `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reserve (optional)' });
13
        if ( $affected1 ) {
14
            say_success( $out, "Comment for course_items.location was updated." );
15
        } else {
16
            say_failure( $out, "Comment for course_items.location was not updated." );
17
        }
18
        my $affected2 = $dbh->do(q{ ALTER TABLE course_items MODIFY `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reserve, this field will be ''yes'', otherwise it will be ''no''' });
19
        if ( $affected2 ) {
20
            say_success( $out, "Comment for course_items.enabled was updated." );
21
        } else {
22
            say_failure( $out, "Comment for course_items.enabled was not updated." );
23
        }
24
25
    },
26
};

Return to bug 36330