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?