With the introduction of the 'status' field it's a clear oportunity to
convert any last remaining instances of 'Rep' to 'L' + 'REPLACED'.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if ( CheckVersion($DBversion) ) {
+
+ my $rows = $dbh->do(
+ qq{
+ UPDATE `accountlines`
+ SET
+ `accounttype` = 'L',
+ `status` = 'REPLACED'
+ WHERE
+ `accounttype` = 'Rep'
+ }
+ );
+
+ SetVersion($DBversion);
+ printf "Upgrade to $DBversion done (Bug 22564 - Fix accounttype 'O' to 'FU' - %d updated)\n", $rows;
+}