fix terms_relationships database table duplicate obejct_ids
-
hi guys,
as it looks like a old developement server “forgot” on phpmyadmin mysql export to set some database table unique and auto increment keys. most of them i could fix.
all these tables don’t contain duplicate entries on unique column:
wp_posts
wp_postmeta
wp_terms
wp_termmeta
wp_term_taxonomybut 1 table is pretty messed, and i guess that’s also the reason for endless media search and really bad performing speed: wp_terms_relationships got no unique column and no auto increment. e’ve been working on the mirrored site for 3 weeks now without discovering the root error.
there’s a total of 20k entries in that table. the table contains 750 duplicate object_id entries, each one between 2 and 38 times.
there is no way to set auto increment and unique column in phpmyadmin before fixing this.
i already tried just to make the object_id unique in libre office calc and then reimport. which messed up everthing as e.g. the nav menu entries seem to be referenced by object_id.
my questions:
is there any way to fix this without losing the past 3 weeks of work?
where does wordpress use the object_id column? pretty often in many places as it looks like.
any way to rebuild the terms_relationships table? the other terms tables look fine…
The topic ‘fix terms_relationships database table duplicate obejct_ids’ is closed to new replies.