My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 16: When I delete the last thread or last post in a forum, the forum is deleted as well
1 person starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Owner:  ----
Closed:  Apr 2008


 
Reported by narma....@gmail.com, Apr 11, 2008
 When we delete this post django marks the parent forum of this item for
removal. Same for latest thread in thread model.
 
I'm using django-forum with mysql 5.0.44 and django 0.97.

 The possible reason is: forum use 'forum_latest_post'(thread use
'thread_latest_post') as foreign key to the last post.

I've attached patches.
fix_foreignkeys.diff
2.0 KB   View   Download
Apr 12, 2008
#1 narma....@gmail.com
Patch notes.

For safe perfomance apply sql patch:
 alter table forum_post add index (time);

And don't forget delete 'forum_latest_post', 'thread_latest_post' indexes for 
existing applications:
 alter table forum_thread drop key forum_thread_thread_latest_post_id;
 alter table forum_forum drop key forum_forum_forum_latest_post_id;
Apr 12, 2008
#2 narma....@gmail.com
"For safe perfomance apply sql patch:
 alter table forum_post add index (time);"

In django model look as 
 time = models.DateTimeField(blank=True, null=True, db_index=True)

Apr 14, 2008
Project Member #3 rwpoul...@gmail.com
Duplicate of #15.
Status: Duplicate

Powered by Google Project Hosting