Bug 31086: DB update
[koha.git] / installer / data / mysql / atomicupdate / bug_31086_do_not_allow_null_branchcode_in_reserves.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "31086",
5     description => "Do not allow null values in branchcodes for reserves",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9         $dbh->do(q{
10             ALTER TABLE reserves
11             MODIFY COLUMN `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 0 COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at'
12         });
13         # Print useful stuff here
14         say $out "Removed NULL option from branchcode for reserves";
15     },
16 };