Some months back an interesting problem was brought to my attention. The problem at hand related to an error that occurred during the Quick Rebuild & Repair process and read as follows:
Executing repair query: Query Failed:ALTER TABLE leads_cstm add column my_customField_c char(36) NULL , add column my_customField_c char(36) NULL::MySQL error 1060: Duplicate column name 'my_customField_c'
Based on the error, one could surmise that SugarCRM was attempting to modify the leads_cstm table to add the column my_customField_c, but failed in the process of doing so because the MySQL server believes the column already exists. In short, one cannot add a column to a table if the column we are attempting to add shares the name of an already existing column.
Examination of the table in question revealed that indeed the field already existed, but why did SugarCRM not recognize this fact?