From 0254fd7a1ffb54cba942a95e23c24619ec6b25c1 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 16 Sep 2016 10:50:33 +0000 Subject: [PATCH] Bug 17135 - DBRev 16.06.00.028 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- ...ug_17135-fix_unclosed_nonaccruing_fines.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl diff --git a/Koha.pm b/Koha.pm index b098d8ea90..072f7fb7da 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 = "16.06.00.027"; +$VERSION = "16.06.00.028"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl b/installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl deleted file mode 100644 index 7da77d19c3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_17135-fix_unclosed_nonaccruing_fines.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = '16.06.00.XXX'; -if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - { - print "Attempting upgrade to $DBversion (Bug 17135) ...\n"; - my $maintenance_script = C4::Context->config("intranetdir") . "/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl"; - system("perl $maintenance_script --confirm"); - print "Upgrade to $DBversion done (Bug 17135 - Fine for the previous overdue may get overwritten by the next one)\n"; - unless ($original_version < TransformToNum("3.23.00.032")) { ## Bug 15675 - print "WARNING: There is a possibility (= just a possibility, it's configuration dependent etc.) that - due to regression introduced by Bug 15675 - some old fine records for overdued items (items which got renewed 1+ time while being overdue) may have been overwritten in your production 16.05+ database. See Bugzilla reports for Bug 14390 and Bug 17135 for more details.\n"; - print "WARNING: Please note that this upgrade does not try to recover such overwitten old fine records (if any) - it's just an follow-up for Bug 14390, its sole purpose is preventing eventual further-on overwrites from happening in the future. Optional recovery of the overwritten fines (again, if any) is like, totally outside of the scope of this particular upgrade!\n"; - } - SetVersion ($DBversion); - } -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index fe0b3813a8..141d16418f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12997,6 +12997,23 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = '16.06.00.028'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + { + print "Attempting upgrade to $DBversion (Bug 17135) ...\n"; + my $maintenance_script = C4::Context->config("intranetdir") . "/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl"; + system("perl $maintenance_script --confirm"); + + print "Upgrade to $DBversion done (Bug 17135 - Fine for the previous overdue may get overwritten by the next one)\n"; + + unless ($original_version < TransformToNum("3.23.00.032")) { ## Bug 15675 + print "WARNING: There is a possibility (= just a possibility, it's configuration dependent etc.) that - due to regression introduced by Bug 15675 - some old fine records for overdued items (items which got renewed 1+ time while being overdue) may have been overwritten in your production 16.05+ database. See Bugzilla reports for Bug 14390 and Bug 17135 for more details.\n"; + print "WARNING: Please note that this upgrade does not try to recover such overwitten old fine records (if any) - it's just an follow-up for Bug 14390, its sole purpose is preventing eventual further-on overwrites from happening in the future. Optional recovery of the overwritten fines (again, if any) is like, totally outside of the scope of this particular upgrade!\n"; + } + SetVersion ($DBversion); + } +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5