From a7c156888af345ef965762543d44fcf48fdfffa7 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 --- installer/data/mysql/db_revs/210508001.pl | 12 ------------ installer/data/mysql/db_revs/210508002.pl | 15 --------------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 27 deletions(-) delete mode 100755 installer/data/mysql/db_revs/210508001.pl delete mode 100755 installer/data/mysql/db_revs/210508002.pl diff --git a/installer/data/mysql/db_revs/210508001.pl b/installer/data/mysql/db_revs/210508001.pl deleted file mode 100755 index 1797614291..0000000000 --- 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 e43b120737..0000000000 --- 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 955d8c79e7..4ac28356fd 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24556,6 +24556,21 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 21.05.08 release" ); } +$DBversion = '21.05.08.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.08.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." ); +} + $DBversion = '21.05.09.000'; if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 21.05.09 release" ); -- 2.32.0 (Apple Git-132)