From 885d0d0164c202ecec2d6bfd1c2c4dc362e1175f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 3 Jun 2020 16:01:39 +0100 Subject: [PATCH] Bug 23091: Database update This patch updates the 'refund' circulation rule to be called 'lostreturn' and populates the value with 'refund' where appropriate. Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_23091.perl | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_23091.perl diff --git a/installer/data/mysql/atomicupdate/bug_23091.perl b/installer/data/mysql/atomicupdate/bug_23091.perl new file mode 100644 index 00000000000..a0b02d3556d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23091.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE circulation_rules SET rule_name = 'lostreturn' WHERE rule_name = 'refund'" ); + $dbh->do( "UPDATE circulation_rules SET rule_value = 'refund' WHERE rule_name = 'lostreturn' AND rule_value = 1" ); + + NewVersion( $DBversion, 23091, "Update refund rules"); +} -- 2.28.0