DBRev 21.11.10.001

This commit is contained in:
Arthur Suzuki 2022-08-16 11:02:36 +02:00
parent cd525e5d08
commit c7e88eff1b
2 changed files with 33 additions and 1 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "21.11.10.000";
$VERSION = "21.11.10.001";
sub version {
return $VERSION;

View File

@ -0,0 +1,32 @@
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'
});
},
};