Bug 36665: (follow-up) Allow choosing a branch with no IP when using AutoLocation
[koha.git] / installer / data / mysql / atomicupdate / bug_36665.pl
1 use Modern::Perl;
2 use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
3
4 return {
5     bug_number  => "36665",
6     description => "Add StaffLoginBranchBasedOnIP",
7     up          => sub {
8         my ($args) = @_;
9         my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11         # Do you stuffs here
12         $dbh->do(
13             q{
14             INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
15             ('StaffLoginBranchBasedOnIP', '0','', 'Set the logged in branch for the user based on their current IP','YesNo')
16         }
17         );
18
19         say $out "Added new system preference 'StaffLoginBranchBasedOnIP'";
20     },
21 };