From 19a5ac1c171e14fed39e4b8e297fa2bc9af6734b Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Wed, 9 Feb 2022 17:17:25 +0000 Subject: [PATCH] Bug 30065: Correct errors in updatedatabase Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- installer/data/mysql/db_revs/210508001.pl | 12 ------------ installer/data/mysql/db_revs/210508002.pl | 15 --------------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 4 files changed, 16 insertions(+), 28 deletions(-) delete mode 100755 installer/data/mysql/db_revs/210508001.pl delete mode 100755 installer/data/mysql/db_revs/210508002.pl diff --git a/Koha.pm b/Koha.pm index a844b8e5c08..384cfadeaf1 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.05.09.000"; +$VERSION = "21.05.09.002"; sub version { return $VERSION; diff --git a/installer/data/mysql/db_revs/210508001.pl b/installer/data/mysql/db_revs/210508001.pl deleted file mode 100755 index 17976142914..00000000000 --- a/installer/data/mysql/db_revs/210508001.pl +++ /dev/null @@ -1,12 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "29457", - description => "Fee Cancellation records the wrong manager_id", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - say $out "WARNING: You may have some incorrect manager_id's recorded against account cancellation lines, please see bugzilla for details."; - say $out "NOTE: You may already have this bugfix applied at an earlier upgrade."; - }, -} diff --git a/installer/data/mysql/db_revs/210508002.pl b/installer/data/mysql/db_revs/210508002.pl deleted file mode 100755 index e43b1207379..00000000000 --- a/installer/data/mysql/db_revs/210508002.pl +++ /dev/null @@ -1,15 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "29557", - description => "Add auto_account_expired to AUTO_RENEWALS notice. Please update your AUTO_RENEWALS notice manually if you have changed or translated it.", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - my @c = $dbh->do(q{ - UPDATE letter - SET content=REPLACE(content, "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]\r\nThis item must be renewed at the library.\r\n[% END %]", "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]\r\nThis item must be renewed at the library.\r\n[% ELSIF checkout.auto_renew_error == 'auto_account_expired' %]\r\nYour account has expired.\r\n[% END %]") - WHERE code="AUTO_RENEWALS" - }); - }, -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 955d8c79e71..5823eaff8d5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24561,6 +24561,21 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 21.05.09 release" ); } +$DBversion = '21.05.09.001'; +if( CheckVersion( $DBversion ) ) { + NewVersion( $DBversion, "29457", "WARNING: You may have some incorrect manager_id's recorded against account cancellation lines, please see bugzilla for details. NOTE: You may already have this bugfix applied at an earlier upgrade."); +} + +$DBversion = '21.05.09.002'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + UPDATE letter + SET content=REPLACE(content, "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]\r\nThis item must be renewed at the library.\r\n[% END %]", "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]\r\nThis item must be renewed at the library.\r\n[% ELSIF checkout.auto_renew_error == 'auto_account_expired' %]\r\nYour account has expired.\r\n[% END %]") + WHERE code="AUTO_RENEWALS" + }); + NewVersion( $DBversion, "29557", "Add auto_account_expired to AUTO_RENEWALS notice. Please update your AUTO_RENEWALS notice manually if you have changed or translated it." ); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.20.1