Best Practice with node_revisions table?
MikeSchinkel - December 24, 2007 - 21:48
Hi,
I'm writing some code that could one day make it into a module so I'd like to make sure I'm following best practices. Can anyone please help me out with the node_revisions table? Here's what (I think) I know thus far:
- There will be one
noderecord and 1 or potentially morenode_revisionsrecords related onnid. - There will be only be one
node_revisionsrecord for a givennodewhen revision tracking is off. node_revisions.vidis the primary key and hence will be unique.node_revisions.timestampcontains an integer that corresponds to the the this revision was last updated.
Correct so far?
So these are my questions:
- Can I assume that the
node_revisionsrecord with the latesttimestampis the most current? - Or should I assume that the
node_revisionsrecord with the largestvidis the most current? - If neither of the prior two how can I tell which
node_revisionsrecord is the most current for a node? - What is the
node_revisions.logfield used for? Mine are always blank? - Where do I set revision tracking in the UI? Do I do it on a per content-type basis? Globally? Other?
- And finally, is there anything else I should know about working with the
node_revisionsusing raw SQL?
Thanks in advance!

anyone?
anyone?
bump
bump