Have just updated Matrix to 2.5.6.

When I go to Add-ons > Fieldtypes > Matrix to trigger the update script I get this error.

A Database Error Occurred Error Number: 1060

Duplicate column name 'var_id'

ALTER TABLE exp_matrix_cols ADD var_id INT(6) UNSIGNED AFTER field_id, ADD INDEX (var_id)

Filename: third_party/matrix/ft.matrix.php

Line Number: 496

  • Can you please clarify what exactly needs to be run? Where is the version number supposed to be set? Inside of the exp_matrix_data table?
    – user3280
    Commented Jun 24, 2014 at 21:28

1 Answer 1


Take a look at the columns in exp_matrix_data table in the database.

  • Does it have a field var_id? If no, then the version you should set is 2.2.
  • If yes, does it have a field is_draft? If no, then the version you should set is 2.3
  • If yes, then the version you should set is 2.5.6

Now, set the version number we determined in the previous three steps for the Matrix field in the exp_fieldtypes table and go visit the Add-ons -> Fieldtypes -> Matrix page and hit submit.

Everything should be all working now.


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.