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...)
|