From 6ce317dd5cc454fd62a14bc26f678051b869c768 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 Feb 2019 13:33:12 +0000 Subject: [PATCH] Bug 3820: (follow-up) Update cardnumber logs match the new format Signed-off-by: Martin Renvoize Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- installer/data/mysql/atomicupdate/bug_3820.perl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_3820.perl diff --git a/installer/data/mysql/atomicupdate/bug_3820.perl b/installer/data/mysql/atomicupdate/bug_3820.perl new file mode 100644 index 0000000000..7ce68db948 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_3820.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE action_logs SET info = REGEXP_REPLACE(info,'cardnumber_replaced','cardnumber') WHERE module='MEMBERS' AND action='MODIFY'" ); + $dbh->do( "UPDATE action_logs SET info = REGEXP_REPLACE(info,'previous_cardnumber','before') WHERE module='MEMBERS' AND action='MODIFY'" ); + $dbh->do( "UPDATE action_logs SET info = REGEXP_REPLACE(info,'new_cardnumber','after') WHERE module='MEMBERS' AND action='MODIFY'" ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 3820 - Update patron modification logs)\n"; +} -- 2.11.4.GIT