Bug 27634: DBRev 23.06.00.020
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8a833a3510
commit
03f160cba9
2
Koha.pm
2
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.019";
|
||||
$VERSION = "23.06.00.020";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
for my $f ( qw( categorycode dateexpiry ) ) {
|
||||
my ( $exists ) = $dbh->selectrow_array(qq{
|
||||
SELECT value from systempreferences
|
||||
WHERE variable="PatronSelfRegistrationBorrowerUnwantedField"
|
||||
AND value LIKE "%$f%"
|
||||
});
|
||||
unless ( $exists ) {
|
||||
$dbh->do(q{
|
||||
UPDATE systempreferences
|
||||
SET value = CONCAT(value, IF(value<>'','|',''), ?)
|
||||
WHERE variable="PatronSelfRegistrationBorrowerUnwantedField"
|
||||
}, undef, $f);
|
||||
}
|
||||
}
|
||||
|
||||
NewVersion( $DBversion, 27634, "Add categorycode and dateexpiry to PatronSelfRegistrationBorrowerUnwantedField");
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "27634",
|
||||
description => "Add categorycode and dateexpiry to PatronSelfRegistrationBorrowerUnwantedField",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
||||
for my $f (qw( categorycode dateexpiry )) {
|
||||
my ($exists) = $dbh->selectrow_array(
|
||||
qq{
|
||||
SELECT value from systempreferences
|
||||
WHERE variable="PatronSelfRegistrationBorrowerUnwantedField"
|
||||
AND value LIKE "%$f%"
|
||||
}
|
||||
);
|
||||
unless ($exists) {
|
||||
$dbh->do(
|
||||
q{
|
||||
UPDATE systempreferences
|
||||
SET value = CONCAT(value, IF(value<>'','|',''), ?)
|
||||
WHERE variable="PatronSelfRegistrationBorrowerUnwantedField"
|
||||
}, undef, $f
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue