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

(-)a/installer/data/mysql/atomicupdate/bug_39618_add_preferred_name_key.pl (-1 / +21 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "39618",
6
    description => "Add index to borrowers.preferred_name",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        unless ( index_exists( 'article_requests', 'debit_id' ) ) {
12
            $dbh->do(
13
                q{
14
                ALTER TABLE `borrowers`
15
                ADD KEY `preferred_name` (`preferred_name`)
16
            }
17
            );
18
        }
19
        say_success( $out, "Added index to borrowers.preferred_name" );
20
    },
21
};

Return to bug 39618