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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | taxonomy_term_depth-index-depth-not-removed-on-uninstall-2950908-2.patch | 435 bytes | vincenzo gambino |
Comments
Comment #2
vincenzo gambino commentedI have attached the patch.
Changed a comma with a dot in a comment.
Comment #3
vincenzo gambino commentedComment #4
vincenzo gambino commentedComment #5
vincenzo gambino commentedComment #6
vincenzo gambino commentedComment #7
cadila commentedComment #9
cadila commentedAdded bugfix to release