From 1fc2e3f7a547a0b703c7e359d9095b00316c4c94 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 31 Aug 2021 10:16:49 +0200 Subject: [PATCH] Bug 28774: DBRev 21.06.00.021 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../bug_28774_remove_blank_rentaldiscount.perl | 8 -------- installer/data/mysql/db_revs/210600021.pl | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_28774_remove_blank_rentaldiscount.perl create mode 100755 installer/data/mysql/db_revs/210600021.pl diff --git a/Koha.pm b/Koha.pm index b268e2863d..04c6279abe 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.06.00.020"; +$VERSION = "21.06.00.021"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_28774_remove_blank_rentaldiscount.perl b/installer/data/mysql/atomicupdate/bug_28774_remove_blank_rentaldiscount.perl deleted file mode 100644 index 395f587dbc..0000000000 --- a/installer/data/mysql/atomicupdate/bug_28774_remove_blank_rentaldiscount.perl +++ /dev/null @@ -1,8 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - DELETE FROM circulation_rules - WHERE rule_name = 'rentaldiscount' AND rule_value='' - }); - NewVersion( $DBversion, 28774, "Delete blank rental discounts"); -} diff --git a/installer/data/mysql/db_revs/210600021.pl b/installer/data/mysql/db_revs/210600021.pl new file mode 100755 index 0000000000..b8a9e2b4d8 --- /dev/null +++ b/installer/data/mysql/db_revs/210600021.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "28774", + description => "Delete blank rental discounts", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + DELETE FROM circulation_rules + WHERE rule_name = 'rentaldiscount' AND rule_value='' + }); + }, +} -- 2.39.5