Hightree
  •  Hightree
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2008-11-30T22:56:11Z
Hi there,
I'm confused about how yaf deletes topics.
The yaf_topic_delete stored procedure has a parameter @EraseTopic, if its set to false, the topic's IsDeleted column will be set to true. As far as I know, this is the way yaf uses the SP.
This way a lot of old topics will clutter the database.
So I guess there's a way to purge these topics, but I have not been able to find it.
Can somebody shed some light on this ?

P.S.
Please feel free to move this thread if I posted in the wrong section.
Sponsor
Hightree
  •  Hightree
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2008-12-14T23:55:22Z
*bump*

Is there nobody around who can shed some light onto this ?
bigtoga
2009-08-21T14:30:45Z
I'm just coming around to this issue myself... I'm still on 1.90 RC2 which has no IsDeleted column. When you delete a topic, by default it sets the Flags column in 1.90 to "8" which means "deleted".

In the source, if you change topic_delete (in yaf.DB to include this line, it will erase the topic:
cmd.Parameters.AddWithValue("@EraseTopic", true);

Check out my implementation of YAF: http://forums.learnsqlserver.com/ .
I am also a SQL Server and .NET trainer over at http://www.learnitfirst.com 
bigtoga
2009-08-21T14:32:15Z
I suppose you could also more easily modify the stored proc's default param value from false to true - that's actually better IMO.

Original:

ALTER procedure [dbo].[yaf_topic_delete] (@TopicID int,@UpdateLastPost bit=1,@EraseTopic bit=0)


New:

ALTER procedure [dbo].[yaf_topic_delete] (@TopicID int,@UpdateLastPost bit=1,@EraseTopic bit=1)


Check out my implementation of YAF: http://forums.learnsqlserver.com/ .
I am also a SQL Server and .NET trainer over at http://www.learnitfirst.com 
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2009-08-21T15:14:57Z

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved