View | Details | Raw Unified | Return to bug 35044
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_35044.pl (-7 / +2 lines)
Lines 42-53 return { Link Here
42
            say $out "Removed UNIQUE KEY `field_record` (`field_id`,`record_id`) from the additional_field_values table";
42
            say $out "Removed UNIQUE KEY `field_record` (`field_id`,`record_id`) from the additional_field_values table";
43
        }
43
        }
44
44
45
        my $additional_fields_values = $dbh->selectall_arrayref(q|SELECT * FROM additional_field_values WHERE value = ''|, { Slice => {} });
45
        my $number_of_entries = $dbh->do(q{DELETE FROM additional_field_values WHERE value = ''});
46
        my $number_of_entries = scalar @{$additional_fields_values};
46
        if ( defined $number_of_entries && $number_of_entries > 0 ) {
47
        if ( $number_of_entries ){
48
            for my $afv (@$additional_fields_values) {
49
                $dbh->do(q{DELETE FROM additional_field_values WHERE value = ''});
50
            }
51
            say $out "Removed $number_of_entries redundant additional_field_values entries with empty value";
47
            say $out "Removed $number_of_entries redundant additional_field_values entries with empty value";
52
        }
48
        }
53
    },
49
    },
54
- 

Return to bug 35044