@@ -, +, @@ --- .../mysql/atomicupdate/Bug13795_Remove_unused_columns.perl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl +++ a/installer/data/mysql/atomicupdate/Bug13795_Remove_unused_columns.perl @@ -1,12 +1,12 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - ALTER TABLE statistics - DROP COLUMN associatedborrower - DROP COLUMN usercode - }); + if( column_exists('statistics', 'associatedborrower') ) { + $dbh->do(q{ ALTER TABLE statistics DROP COLUMN associatedborrower }); + } + if( column_exists('statistics', 'usercode') ) { + $dbh->do(q{ ALTER TABLE statistics DROP COLUMN usercode }); + } SetVersion($DBversion); - print "Upgrade to $DBversion done (Bug 13795 - Delete unused fields from statistics table)\n"; } --