1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
4 # Add LOST_FOUND debit type
7 account_credit_types ( code, description, can_be_added_manually, is_system )
9 ('LOST_FOUND', 'Lost item fee refund', 0, 1)
12 # Migrate LOST_RETURN to LOST_FOUND
17 credit_type_code = 'LOST_FOUND'
19 credit_type_code = 'LOST_RETURN'
22 # Migrate LOST + RETURNED to LOST + FOUND
29 debit_type_code = 'LOST'
34 # Drop LOST_RETURNED credit type
36 DELETE FROM account_credit_types WHERE code = 'LOST_RETURN'
39 # Add Lost Item Found offset type
42 account_offset_types ( type )
47 SetVersion( $DBversion );
48 print "Upgrade to $DBversion done (Bug 24592 - Update LOST_RETURN to LOST_FOUND)\n";