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

(-)a/Koha/Database/Commenter.pm (-3 / +2 lines)
Lines 182-190 sub _fetch_schema_comments { Link Here
182
    my $info = {};
182
    my $info = {};
183
    my $current_table = q{};
183
    my $current_table = q{};
184
    foreach my $line ( @schema_lines ) {
184
    foreach my $line ( @schema_lines ) {
185
        if( $line =~ /^CREATE TABLE `?(\w+)`?/ ) {
185
        if( $line =~ /^CREATE TABLE\s*(?:IF NOT EXISTS)?\s*`?(\w+)`?/ ) {
186
            $current_table = $1;
186
            $current_table = $1;
187
        } elsif( $line =~ /^\s+`?(\w+)`?.*COMMENT ['"](.+)['"][,)]?$/ ) {
187
        } elsif( $current_table && $line =~ /^\s+`?(\w+)`?.*COMMENT ['"](.+)['"][,)]?$/ ) {
188
            my ( $col, $comment ) = ( $1, $2 );
188
            my ( $col, $comment ) = ( $1, $2 );
189
            $comment =~ s/''/'/g; # we call quote later on
189
            $comment =~ s/''/'/g; # we call quote later on
190
            $info->{$current_table}->{$col} = $comment;
190
            $info->{$current_table}->{$col} = $comment;
191
- 

Return to bug 32334