Upon installation two indexes are created inside taxonomy_term_data table.
One is depth mapped to dept column and the second one is also called depth and is mapped to the tid column.

Upon installation only the the first one is deleted leaving the second one (depth mapped to tid) on the index list.

If you try to reinstall the module is will throw an error of duplicating depth key.

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'depth': ALTER TABLE {taxonomy_term_data} ADD `depth` TINYINT DEFAULT NULL COMMENT 'Taxonomy depth', ADD INDEX `depth` (`depth`, `tid`); Array ( ) in db_add_field() (line ... docroot/includes/database/database.inc).

I am now attaching the patch to fix the error by deleting the index upon uninstallation.

Comments

Vincenzo Gambino created an issue. See original summary.

vincenzo gambino’s picture

I have attached the patch.

Changed a comma with a dot in a comment.

vincenzo gambino’s picture

vincenzo gambino’s picture

Status: Active » Needs review
vincenzo gambino’s picture

Issue summary: View changes
vincenzo gambino’s picture

Assigned: vincenzo gambino » Unassigned
cadila’s picture

Status: Needs review » Reviewed & tested by the community

cadila’s picture

Status: Reviewed & tested by the community » Fixed

Added bugfix to release

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.