Closed (works as designed)
Project:
Drupal core
Version:
x.y.z
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2005 at 20:28 UTC
Updated:
24 Mar 2005 at 21:06 UTC
Commit# 14491 modifies the term_node table to make both tid and nid primary keys. That is,
ALTER TABLE term_node ADD PRIMARY KEY (tid,nid);
However, I've got nodes (as referenced by nid) that have multiple taxonomy terms associated with them (as reference by tid). As such, the node_term table with have duplicate entries of nid, one for each term (tid) that the node is associated with. I don't believe you can make a column a primary key if the values are not unique can you?
(Ref: http://drupal.org/node/19275)
-- timothy
Comments
Comment #1
chx commentedIt's a multiple column PRIMARY KEY and it will apply unless you have the same nid-tid pair twice which shall not happen...
Comment #2
gábor hojtsyNot a bug.
Comment #3
timothy bennett commentedAgreed. Mea culpa.
Based on your comments, I dug deeper into my term_node table and I actually had several duplicate tid-nid pairs. Not sure how that happened...