List Info

Thread: deleting old versions




deleting old versions
user name
2007-02-27 15:05:51
Anyone have a script/SQL for keeping only the last N
versions
of stories in the database?

Re: deleting old versions
user name
2007-02-28 15:02:18
On Tue, 27 Feb 2007, Scott Lanning wrote:
> Anyone have a script/SQL for keeping only the last N
versions
> of stories in the database?

I take that as a 'no'.
Attached is what I whipped up.
DISCLAIMER: NO WARRANTY, NO GUARANTEE OF USEABILITY,
it might hose your entire database, set the building on
fire,
have unintended side-effects, etc.
Backup your data. Test on a test machine.
  
Re: deleting old versions
user name
2007-02-28 15:13:10
On Wed, 28 Feb 2007, Scott Lanning wrote:
> On Tue, 27 Feb 2007, Scott Lanning wrote:
>> Anyone have a script/SQL for keeping only the last
N versions
>> of stories in the database?
>
> I take that as a 'no'.
> Attached is what I whipped up.
> DISCLAIMER: NO WARRANTY, NO GUARANTEE OF USEABILITY,
> it might hose your entire database, set the building on
fire,
> have unintended side-effects, etc.
> Backup your data. Test on a test machine.

Also I wanted to mention that you should probably
vacuum and reindex after doing this. (I assume...)

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )