From 3eb7480e0c58f095a138d3efc16746699db3ccf9 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Sun, 9 Jan 2022 20:21:54 -1000 Subject: [PATCH] Bug 26296: DBrev 21.12.00.004 Signed-off-by: Fridolin Somers --- Koha.pm | 2 +- ...a-with-pipe-in-OPACSuggestion-preferences.perl | 15 --------------- installer/data/mysql/db_revs/211200004.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl create mode 100755 installer/data/mysql/db_revs/211200004.pl diff --git a/Koha.pm b/Koha.pm index 58fec07fad..1d8c033fe5 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.12.00.003"; +$VERSION = "21.12.00.004"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl b/installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl deleted file mode 100644 index d1448086f7..0000000000 --- a/installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl +++ /dev/null @@ -1,15 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - # you can use $dbh here like: - # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); - - # or perform some test and warn - # if( !column_exists( 'biblio', 'biblionumber' ) ) { - # warn "There is something wrong"; - # } - - $dbh->do("UPDATE systempreferences SET value = REPLACE(value, ',', '|') WHERE variable IN ('OPACSuggestionMandatoryFields','OPACSuggestionUnwantedFields')"); - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 26296, "Replace comma with pipe in OPACSuggestion field preferences"); -} diff --git a/installer/data/mysql/db_revs/211200004.pl b/installer/data/mysql/db_revs/211200004.pl new file mode 100755 index 0000000000..6e73d6dc6f --- /dev/null +++ b/installer/data/mysql/db_revs/211200004.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "26296", + description => "Replace comma with pipe in OPACSuggestion field preferences", + up => sub { + my ($args) = @_; + my $dbh = $args->{dbh}; + + $dbh->do(q{ + UPDATE systempreferences SET value = REPLACE(value, ',', '|') + WHERE variable IN ('OPACSuggestionMandatoryFields','OPACSuggestionUnwantedFields') + }); + }, +} -- 2.39.5