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

(-)a/installer/data/mysql/db_revs/231200017.pl (-5 / +10 lines)
Lines 6-17 return { Link Here
6
    up          => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        $dbh->do(
9
        my ($pref_exists) = $dbh->selectrow_array(
10
            q{
10
            q{SELECT COUNT(*) FROM systempreferences WHERE variable = 'ElasticsearchPreventAutoTruncate'});
11
12
        # The pref is renamed in 250600017.pl, do not insert it if it has been renamed already
13
        unless ($pref_exists) {
14
            $dbh->do(
15
                q{
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
16
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
12
            VALUES ('ESPreventAutoTruncate', 'barcode|control-number|control-number-identifier|date-of-acquisition|date-of-publication|date-time-last-modified|identifier-standard|isbn|issn|itype|lc-card-number|number-local-acquisition|other-control-number|record-control-number', NULL, 'List of searchfields (separated by | or ,) that should not be autotruncated by Elasticsearch even if QueryAutoTruncate is set to Yes', 'Free')
17
            VALUES ('ESPreventAutoTruncate', 'barcode|control-number|control-number-identifier|date-of-acquisition|date-of-publication|date-time-last-modified|identifier-standard|isbn|issn|itype|lc-card-number|number-local-acquisition|other-control-number|record-control-number', NULL, 'List of searchfields (separated by | or ,) that should not be autotruncated by Elasticsearch even if QueryAutoTruncate is set to Yes', 'Free')
13
        }
18
        }
14
        );
19
            );
15
        say $out "Added new system preference 'ESPreventAutoTruncate'";
20
            say $out "Added new system preference 'ESPreventAutoTruncate'";
21
        }
16
    },
22
    },
17
};
23
};
18
- 

Return to bug 39526