| 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 |         say_info( $out, $affected1 ); | 
            
              | 14 |         if ( $affected1 ) { | 
            
              | 15 |             say_success( $out, "Comment for course_items.location was updated." ); | 
            
              | 16 |         } else { | 
            
              | 17 |             say_failure( $out, "Comment for course_items.location was not updated." ); | 
            
              | 18 |         } | 
            
              | 19 |         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''' }); | 
            
              | 20 |         if ( $affected2 ) { | 
            
              | 21 |             say_success( $out, "Comment for course_items.enabled was updated." ); | 
            
              | 22 |         } else { | 
            
              | 23 |             say_failure( $out, "Comment for course_items.enabled was not updated." ); | 
            
              | 24 |         } | 
            
              | 25 |  | 
            
              | 26 |     }, | 
            
              | 27 | }; |