I am trying to create the autoincrment field at database level on SugarCloud
Reference:- support.sugarcrm.com/.../
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$dictionary['Lead']['fields']['lead_number'] = [
'name' => 'lead_number',
'vname' => 'LBL_NUMBER',
'type' => 'int',
'readonly' => true,
'reportable' => true,
'len' => 11,
'required' => true,
'auto_increment' => true,
'unified_search' => true,
'full_text_search' => ['enabled' => true, 'searchable' => true, 'boost' => 1.25],
'comment' => 'Visual unique identifier',
'duplicate_merge' => 'disabled',
'disable_num_format' => true,
'studio' => ['quickcreate' => false],
'duplicate_on_record_copy' => 'no',
];
$dictionary['Lead']['indices']['leadnumk'] = ['name' => 'leadnumk', 'type' => 'unique', 'fields' => ['lead_number']];
While Quick Repair Rebuild is generating following query which is not correct and giving database failure.

In the document it's mentioned to alter this query, but i am trying to make this non-editable and adding correct SQL but it's still running this statement.
Any suggestion