From c7e88eff1bacb2bd46b3344ba31f3ddaa27fa351 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Tue, 16 Aug 2022 11:02:36 +0200 Subject: [PATCH] DBRev 21.11.10.001 --- Koha.pm | 2 +- installer/data/mysql/db_revs/211110001.pl | 32 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/db_revs/211110001.pl diff --git a/Koha.pm b/Koha.pm index 4fc3a7af01..30b7c79076 100644 --- a/Koha.pm +++ b/Koha.pm @@ -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; diff --git a/installer/data/mysql/db_revs/211110001.pl b/installer/data/mysql/db_revs/211110001.pl new file mode 100755 index 0000000000..da0000bea5 --- /dev/null +++ b/installer/data/mysql/db_revs/211110001.pl @@ -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' + }); + }, +}; -- 2.39.5