Database failure. Please refer to sugarcrm.log for details in SugarCRM Professional 11.05

Good Day!

I have a problem with creating fields because I am unable to create columns in the database due to the error I encounter every time I finish the Quick Repair and Rebuild. Check the error logs below:

Fri Jan 20 01:26:13 2023 [1447][1][ALERT] Executing repair query:  Query Failed: ALTER TABLE accounts   add COLUMN lead_date date  NULL ,  add COLUMN tp_completed_date date  NULL ,  add COLUMN dne_completed_date date  NULL ,  add COLUMN loi_completed varchar(255)  NULL ,  add COLUMN loi_sent varchar(255)  NULL ,  add COLUMN loi_accepted varchar(255)  NULL ,  add COLUMN items_ordered varchar(255)  NULL ,  add COLUMN underwriting_submitted varchar(255)  NULL ,  add COLUMN underwriting_approved varchar(255)  NULL ,  add COLUMN underwriting_terms_accepted varchar(255)  NULL ,  add COLUMN loan_fees_completed_date date  NULL ,  add COLUMN loan_doc_request_date date  NULL ,  add COLUMN loan_docs_out_date date  NULL ,  add COLUMN loan_funded_date date  NULL ,  add COLUMN pre_funding_checklist_date date  NULL ,  add COLUMN post_funding_completed varchar(255)  NULL ,  add COLUMN paid_off varchar(255)  NULL ,  add COLUMN cancelled varchar(255)  NULL ,  add COLUMN declined varchar(255)  NULL ,  add COLUMN property_type varchar(100)  NULL ,  add COLUMN no_of_units varchar(100)  NULL ,  add COLUMN purpose_of_loan varchar(100)  NULL ,  add COLUMN type_of_loan varchar(100)  NULL ,  add COLUMN transaction_type varchar(100)  NULL ,  add COLUMN use_of_funds varchar(100)  NULL ,  add COLUMN occupancy varchar(100)  NULL ,  add COLUMN property_rights varchar(100)  NULL ,  add COLUMN suburban_or_rural varchar(100)  NULL ,  add COLUMN purchase_transaction_type varchar(100)  NULL ,  add COLUMN purchase_status varchar(100)  NULL ,  add COLUMN purchase_price decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN currency_id char(36)  NULL ,  add COLUMN base_rate decimal(26,6)  NULL ,  add COLUMN rehab_amount decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN sq_ft_addition varchar(255)  NULL ,  add COLUMN as_is_value decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN arv_market_value decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN coe_date date  NULL ,  add COLUMN holding_title varchar(100)  DEFAULT 'appraiser' NULL ,  add COLUMN no_of_active_flips_currently varchar(255)  NULL ,  add COLUMN no_of_closed_flips_ytd varchar(255)  NULL ,  add COLUMN no_of_closed_flips_last_year varchar(255)  NULL ,  add COLUMN no_of_closed_flips_lifetime varchar(255)  NULL ,  add COLUMN net_worth decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN cash_reserves decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN credit varchar(100)  NULL ,  add COLUMN foreclosure varchar(255)  NULL ,  add COLUMN bankruptcy varchar(255)  NULL ,  add COLUMN exit_strategy varchar(100)  NULL ,  add COLUMN executive_notes text  NULL ,  add COLUMN pq_completed_date datetime  NULL ,  add COLUMN lien_position varchar(100)  NULL ,  add COLUMN loan_amount decimal(26,6)  DEFAULT 0 NULL ,  add COLUMN loan_terms varchar(100)  NULL ,  add COLUMN amortization_type varchar(100)  NULL ,  add COLUMN interest_rate decimal(3,3)  NULL ,  add COLUMN mortgage_payment_type varchar(100)  NULL ,  add COLUMN monthly_payment_p_&amp: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&amp' at line 1
Fri Jan 20 01:26:13 2023 [1447][1][FATAL] died with message: Database failure. Please refer to sugarcrm.log for details.

Parents
  • I am puzzled by your Alter table statement, it seems you are changing the accounts table which comes with your Sugar instance. Any custom fields should go into accounts_cstm not accounts.

    Also, at the end of your alter table statement is "add COLUMN monthly_payment_p_&amp" and the error is telling you the &amp is a problem.

    How did you add these fields? By modifying accounts instead of using accounts_cstm you risk loosing you are making a non-upgrade-safe change to your instance.

    FrancescaS

Reply
  • I am puzzled by your Alter table statement, it seems you are changing the accounts table which comes with your Sugar instance. Any custom fields should go into accounts_cstm not accounts.

    Also, at the end of your alter table statement is "add COLUMN monthly_payment_p_&amp" and the error is telling you the &amp is a problem.

    How did you add these fields? By modifying accounts instead of using accounts_cstm you risk loosing you are making a non-upgrade-safe change to your instance.

    FrancescaS

Children