I receive the error message âDatabase failure. Please refer to sugarcrm.log for detailsâ after clicking save and deploy when creating a relationship. I was attempting to create a one to many relationship between the accounts module and a custom module named âProduct Informationâ.
I see 2 things wrong with the insert query found in the log; the value to be inserted into the field âjoin_key_rhsâ is 65 characters. The field is defined as nchar(64). Also the value for relationship_type is âmany to manyâ which is incorrect. I am using Sql Server 2008
From the log:
09/16/14 11:43:33 [788][939d0275-f1f3-38a2-3bac-53fb284fe4ff][FATAL] Query Failed:INSERT into relationships (id,relationship_name,lhs_module,lhs_table,lhs_key,rhs_module,rhs_table,rhs_key,join_table,join_key_lhs,join_key_rhs,relationship_type) values (Nâ16dfe4e0-b318-c185-72b3-54185a2d2c50â,Nâaccounts_prdin_product_information_1â,NâAccountsâ,Nâaccountsâ,Nâidâ,NâPrdIn_Product_Informationâ,Nâprdin_product_informationâ,Nâidâ,Nâaccounts_prdin_product_information_1_câ,Nâaccounts_prdin_product_information_1accounts_idaâ,Nâaccounts_prdin_product_information_1prdin_product_information_idbâ,Nâmany-to-manyâ)::: [Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated.
There are also several of the following error:
09/16/14 13:28:04 [2968][a1c44b41-c4b8-5572-0fe3-53fb28434ff8][FATAL] Query Failed:SELECT * FROM config
where name = Nâmodule_twitterâ and value = 1;::: [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near â`â.