3

At a client of us we have a problem with the database scheme. CiviCRM is working normally except that when you want to merge contacts the Activities/Groups/Relationships etc.. are missing in the merge screen.

After some investigation it turns out the merge functionality use the mysql databasescheme for fin ding out which tables are linked to a contact.

It does so with the query below:

SELECT table_name, column_name
FROM information_schema.key_column_usage
WHERE referenced_table_schema = database() 
AND referenced_table_name = 'civicrm_contact' 
AND referenced_column_name = 'id';

The problem at this specific installation is that the information_scheme.key_column_usage is empty for this specific database.

So I assume that the foreign key relationships are missing in mysql. In the past this civicrm site has moved databases from one to another and there has been an update from 4.5.x to 4.6.x

Does anyone know how to fix the database scheme?

Thanks

1

Having spoken to our hosting experts we are going to rebuild foreign keys. Will update you shortly.

thanks, Jon-man

  • Did you ever end up getting them rebuilt? I am having a similar issue. Any help with doing that would be great. – Sleewok Sep 6 '16 at 19:09
  • Yes @Sleewok we got this fixed by getting them rebuilt. It took us a while to idenitify this, but the problem usually occurs when a site is migrated. – Jon-man Oct 14 '16 at 13:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.