@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_22435.perl | 8 ++++++++ installer/data/mysql/mandatory/account_offset_types.sql | 1 + 2 files changed, 9 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_22435.perl --- a/installer/data/mysql/atomicupdate/bug_22435.perl +++ a/installer/data/mysql/atomicupdate/bug_22435.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "INSERT IGNORE INTO account_offset_types () VALUES ( 'CREATE' )" ); + $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)" ); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 22435, "Update offsets to CREATE type"); +} --- a/installer/data/mysql/mandatory/account_offset_types.sql +++ a/installer/data/mysql/mandatory/account_offset_types.sql @@ -1,4 +1,5 @@ INSERT INTO account_offset_types ( type ) VALUES +('CREATE'), ('Writeoff'), ('Payment'), ('Purchase'), --