From af206b78bc4ebcb619ffa78822bf3819e3557dc6 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 27 Apr 2022 10:46:14 -1000 Subject: [PATCH] Bug 29648: DBRev 21.12.00.038 Signed-off-by: Fridolin Somers --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_29648_2.pl | 14 -------------- .../bug_29648.pl => db_revs/211200038.pl} | 10 ++++++++-- 3 files changed, 9 insertions(+), 17 deletions(-) delete mode 100755 installer/data/mysql/atomicupdate/bug_29648_2.pl rename installer/data/mysql/{atomicupdate/bug_29648.pl => db_revs/211200038.pl} (64%) diff --git a/Koha.pm b/Koha.pm index be03c5cd30..851c98bb00 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.12.00.037"; +$VERSION = "21.12.00.038"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_29648_2.pl b/installer/data/mysql/atomicupdate/bug_29648_2.pl deleted file mode 100755 index 555fb676e7..0000000000 --- a/installer/data/mysql/atomicupdate/bug_29648_2.pl +++ /dev/null @@ -1,14 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "29648", - description => "Allow tables_settings.default_display_length to be NULL", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - $dbh->do(q{ - ALTER TABLE tables_settings - MODIFY COLUMN default_display_length smallint(6) DEFAULT NULL - }); - }, -} diff --git a/installer/data/mysql/atomicupdate/bug_29648.pl b/installer/data/mysql/db_revs/211200038.pl similarity index 64% rename from installer/data/mysql/atomicupdate/bug_29648.pl rename to installer/data/mysql/db_revs/211200038.pl index 35358ce795..ba1d3f4ee0 100755 --- a/installer/data/mysql/atomicupdate/bug_29648.pl +++ b/installer/data/mysql/db_revs/211200038.pl @@ -2,11 +2,16 @@ use Modern::Perl; return { bug_number => "29648", - description => "Move NumSavedReports to table settings", + description => "Move NumSavedReports to table settings and allow tables_settings.default_display_length to be NULL", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + ALTER TABLE tables_settings + MODIFY COLUMN default_display_length smallint(6) DEFAULT NULL + }); + my $NumSavedReports = C4::Context->preference('NumSavedReports'); $dbh->do(q{ DELETE FROM systempreferences @@ -18,6 +23,7 @@ return { INSERT IGNORE INTO tables_settings (module, page, tablename, default_display_length, default_sort_order) VALUES('reports', 'saved-sql', 'table_reports', ?, 1) }, undef, $NumSavedReports); + say $out "NumSavedReports value '$NumSavedReports' moved to table settings"; } }, -} +}; -- 2.39.5