Bug 25389: Catch errant cases of LOST_RETURNED
[koha-equinox.git] / installer / data / mysql / atomicupdate / bug_25389.perl
1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3
4     # Migrate LOST_RETURNED to LOST_FOUND
5     $dbh->do(qq{
6         UPDATE
7           accountlines
8         SET
9           credit_type_code = 'LOST_FOUND'
10         WHERE
11           credit_type_code = 'LOST_RETURNED'
12     });
13
14     # Drop LOST_RETURNED credit type
15     $dbh->do(qq{
16         DELETE FROM account_credit_types WHERE code = 'LOST_RETURNED'
17     });
18
19     NewVersion( $DBversion, 25389, "Catch errant cases of LOST_RETURNED");
20 }