Iāve the same issue. Upgrading 7.12.8 to 7.14.3, PHP 8.2 (also tried with PHP 8.0), MS SQL Server 2019.
Cause is related to the following syntax in \modules\Relationships\vardefs.php
, 'indices' => array(
array('name' =>'relationshippk', 'type' =>'primary', 'fields'=>array('id')),
array('name' =>'idx_rel_name', 'type' =>'index', 'fields'=>array('relationship_name')),
Amending to
, 'indices' => array(
array('name' =>'relationshippk', 'type' =>'primary', 'fields'=>'id'),
array('name' =>'idx_rel_name', 'type' =>'index', 'fields'=>'relationship_name'),
Resolves the error but then fails on the next module with indices / SQL indexes defined.
Where fields has multiple elements the approach above will not work e.g.,
, 'indices' => array(
array('name' => 'idx_lead_acct_name_first', 'type' => 'index', 'fields' => array('account_name', 'deleted')),
array('name' => 'idx_lead_last_first', 'type' => 'index', 'fields' => array('last_name', 'first_name', 'deleted')),
array('name' => 'idx_lead_del_stat', 'type' => 'index', 'fields' => array('last_name', 'status', 'deleted', 'first_name')),
array('name' => 'idx_lead_opp_del', 'type' => 'index', 'fields' => array('opportunity_id', 'deleted',)),
array('name' => 'idx_leads_acct_del', 'type' => 'index', 'fields' => array('account_id', 'deleted',)),
array('name' => 'idx_del_user', 'type' => 'index', 'fields' => array('deleted', 'assigned_user_id')),
array('name' => 'idx_lead_assigned', 'type' => 'index', 'fields' => array('assigned_user_id')),
array('name' => 'idx_lead_contact', 'type' => 'index', 'fields' => array('contact_id')),
array('name' => 'idx_reports_to', 'type' => 'index', 'fields' => array('reports_to_id')),
array('name' => 'idx_lead_phone_work', 'type' => 'index', 'fields' => array('phone_work')),
array('name' => 'idx_leads_id_del', 'type' => 'index', 'fields' => array('id', 'deleted',)),
)
Which files / classes process the indices and split the fields array into SQL syntax?