Koha/installer/data/mysql/db_revs/220600012.pl
Tomas Cohen Arazi ae9c951160
Bug 24010: DBRev 22.06.00.012
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 11:11:54 -03:00

32 lines
936 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "24010",
description => "Make subscription.staffdisplaycount and opacdisplaycount integer columns",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
UPDATE subscription
SET staffdisplaycount = NULL
WHERE staffdisplaycount = ""
});
$dbh->do(q{
ALTER TABLE subscription
MODIFY COLUMN staffdisplaycount INT(11) NULL DEFAULT NULL
COMMENT 'how many issues to show to the staff'
});
$dbh->do(q{
UPDATE subscription
SET opacdisplaycount = NULL
WHERE opacdisplaycount = ""
});
$dbh->do(q{
ALTER TABLE subscription
MODIFY COLUMN opacdisplaycount INT(11) NULL DEFAULT NULL
COMMENT 'how many issues to show to the public'
});
},
};