use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);

return {
    bug_number  => "28884",
    description => "Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences",
    up          => sub {
        my ($args) = @_;
        my ( $dbh, $out ) = @$args{qw(dbh out)};

        $dbh->do(
            q{ INSERT IGNORE INTO systempreferences ( `variable`, `value` )
        VALUES ('ElasticsearchEscapeCharacters', '')}
        );

        say $out "Added new system preference 'ElasticsearchEscapeCharacters'";

        $dbh->do(
            q{ INSERT IGNORE INTO systempreferences ( `variable`, `value` )
        VALUES ('OpacElasticsearchEscapeCharacters', '')}
        );

        say $out "Added new system preference 'OpacElasticsearchEscapeCharacters'";
    },
};
