Fixes what looks like an oversight
https://github.com/civicrm/civicrm-core/commit/
022785d8d5d4876aa1211b7adc0d7c31e2995fc5#diff-08ba0d294c1f2e5b9d42e4768aa3b30a10e5128809c590f155c5ac0cc9b2f69cL480-L481
An 'if' was added but the uncondition line left in
The result is that if a composite primary field IS defined
per below an entry for it is incorrectly added to the field
array with just autoincrement set.
`
<primaryKey>
<name>contact_timestamp_type</name>
<field>contact_identifier</field>
<field>recipient_action_datetime</field>
<field>event_type</field>
</primaryKey>
`
if (isset($fields[$name])) {
$fields[$name]['autoincrement'] = $auto;
}
- $fields[$name]['autoincrement'] = $auto;
+
$primaryKey = [
'name' => $name,
'autoincrement' => $auto,