Bug 22564: Add database update 'just in case'
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>
This commit is contained in:
parent
b3de8738b7
commit
d8dfb61a90
|
|
@ -0,0 +1,17 @@
|
|||
$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;
|
||||
}
|
||||
Loading…
Reference in New Issue