From 7cb3241f0604b36b2cd0c2364429177a84813169 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 1 Nov 2023 15:35:33 -0300 Subject: [PATCH] Bug 26170: DBRev 23.06.00.057 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../bug26170-protected-patrons.pl => db_revs/230600057.pl} | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename installer/data/mysql/{atomicupdate/bug26170-protected-patrons.pl => db_revs/230600057.pl} (81%) diff --git a/Koha.pm b/Koha.pm index 0c814b0a4e..c1c21165cd 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 = "23.06.00.056"; +$VERSION = "23.06.00.057"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug26170-protected-patrons.pl b/installer/data/mysql/db_revs/230600057.pl similarity index 81% rename from installer/data/mysql/atomicupdate/bug26170-protected-patrons.pl rename to installer/data/mysql/db_revs/230600057.pl index 7b27bb1337..c9b7921818 100755 --- a/installer/data/mysql/atomicupdate/bug26170-protected-patrons.pl +++ b/installer/data/mysql/db_revs/230600057.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "26170", - description => "Create system patrons that cannot be (easily) deleted via the web UI", + description => "Add protected status for patrons", up => sub { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; @@ -14,8 +14,9 @@ return { AFTER `primary_contact_method`; } ); + say $out "Added column 'borrowers.protected'"; } - say $out "Added column borrowers.protected"; + if ( !column_exists( 'deletedborrowers', 'protected' ) ) { $dbh->do( q{ @@ -24,7 +25,7 @@ return { AFTER `primary_contact_method`; } ); + say $out "Added column 'deletedborrowers.protected'"; } - say $out "Added column deletedborrowers.protected"; }, }; -- 2.39.5