I stuck with the error. When I try to repair indices I get error message:

CREATE UNIQUE INDEX index_entity_id_entity_table_account_relationship ON 
civicrm_entity_financial_account (entity_id, entity_table, 
account_relationship) [nativecode=1062 ** Duplicate entry '0-
civicrm_financial_type-12' for key 
[type] => DB_Error

If I look into table see no problems.

  • What means: 0-civicrm_financial_type-12 I Checked the table no duplicate for first sight on 'civicrm_financial_type' field values.
    – r4zoli
    Commented Aug 24, 2017 at 8:28
  • When you say no problems, do you mean no duplicate rows? Commented Aug 24, 2017 at 8:35
  • I found it in rows: 27,civicrm_financial_type,0,12,15 28,civicrm_financial_type,0,12,16 Now what next?
    – r4zoli
    Commented Aug 24, 2017 at 8:39
  • I found it The "0-s" is wrong values. They must be 4, and 2. The index value must be 1 or above. Can I change it?
    – r4zoli
    Commented Aug 24, 2017 at 9:19
  • Well, that explains why you could not create the index, and you can retry it after the update. I do not know if the new values are functionally correct. But you did some research. Commented Aug 24, 2017 at 12:24

1 Answer 1


Summarizing the discussion from the comments.

  1. The error indicates that the table contains a duplicate row.
  2. After the row was updated the index could be created.
  3. To find the correct values for the row was done by examining the linked tables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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