[wp-hackers] post_status == previous
Evan Broder
wp at ebroder.net
Mon Feb 13 21:27:36 GMT 2006
Craig wrote:
> What if a post id number was assigned and it stayed with that post
> regardless of what happens to it? In other words, every single post
> gets a
> unique id number, period.
>
> At work we are currently suffering the consequences of old "dead" objects
> which had been deleted from our database but in subsequent uses, the
> "old,
> dead" id was re-used. OMG, what a headache.
>
> Craig
Sounds like a lot of fun. I didn't know any databases reused keys.
Anyway, in a wiki sort of setup, I think the current version of a post
should always retain its current ID. Old versions would be appended to
the end of the table.
e.g.:
I save a post as a draft, it gets an ID of 2.
I then make some more changes. The original version gets a new ID of 5,
but the current draft stays at 2.
If you don't do that, you're going to run into all kinds of screwiness
with comments and the like.
But, I agree that this sort of thing should be implemented as a plugin,
although there's no reason that plugin couldn't be included with the
standard distribution.
- Evan
More information about the wp-hackers
mailing list