[wp-hackers] Data recovery (post_status?)

David Chait davebytes at comcast.net
Sun Feb 12 15:44:49 GMT 2006

I'm happy with any solution that is reasonably quick to query, and takes 
minimal-if-any resources to exclude from queries.  If you have to query a 
secondary table, or test a character, that'll make it more difficult to 
'exclude'.  That's why I proposed post-status==trash, though I admittedly 
didn't consider the 'how to put things back' for posts vs comments vs ...  I 
think the period-prefix thing is a potential query bottleneck...

do we simply need a 'trash' flag on all major object tables?  that just 
seems overkill in one sense, in another it simplifies stuff greatly.


----- Original Message ----- 
From: "David House" <dmhouse at gmail.com>
To: <wp-hackers at lists.automattic.com>
Sent: Sunday, February 12, 2006 7:26 AM
Subject: Re: [wp-hackers] Data recovery (post_status?)

On 12/02/06, Mark Jaquith <mark.wordpress at txfx.net> wrote:
> Could use postmeta to store the old value.

We could indeed. +1.

> You mean, like going from `post_status` = 'draft' to `post_status` =
> '.draft' ?  That way you could imply "trash" and "where was it
> originally" in one go.

I was thinking we prepend it to the slug, actually.

Anyway, we need to decide whether to use post_status (in which case
we'd need a comment_status, user_status, link_status, etc. for
everywhere else you want this recycle bin to happen) or whether to
prepend something like a period to the respective objects' slugs.
(Note that we currently don't allow periods in slugs so there's no
danger of breakage)

More information about the wp-hackers mailing list