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 |
- |
|
|