Lines 2-7
$DBversion = 'XXX'; # will be replaced by the RM
Link Here
|
2 |
if( CheckVersion( $DBversion ) ) { |
2 |
if( CheckVersion( $DBversion ) ) { |
3 |
$dbh->do( "INSERT IGNORE INTO account_offset_types ( type ) VALUES ( 'CREATE' ), ( 'APPLY' )" ); |
3 |
$dbh->do( "INSERT IGNORE INTO account_offset_types ( type ) VALUES ( 'CREATE' ), ( 'APPLY' )" ); |
4 |
$dbh->do( "UPDATE account_offsets SET type = 'CREATE' WHERE type != 'OVERDUE_INCREASE' AND type != 'OVERDUE_DECREASE' AND ( debit_id IS NULL OR credit_id IS NULL)" ); |
4 |
$dbh->do( "UPDATE account_offsets SET type = 'CREATE' WHERE type != 'OVERDUE_INCREASE' AND type != 'OVERDUE_DECREASE' AND ( debit_id IS NULL OR credit_id IS NULL)" ); |
|
|
5 |
$dbh->do( "UPDATE account_offsets SET type = 'APPLY' WHERE type != 'OVERDUE_INCREASE' AND type != 'OVERDUE_DECREASE' AND type != 'CREATE'" ); |
5 |
|
6 |
|
6 |
NewVersion( $DBversion, 22435, "Update offsets to CREATE type"); |
7 |
NewVersion( $DBversion, 22435, "Update offsets to CREATE type"); |
7 |
} |
8 |
} |
8 |
- |
|
|