google-code-export / django-forum

Automatically exported from code.google.com/p/django-forum
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

When I delete the last thread or last post in a forum, the forum is deleted as well #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 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.

Original issue reported on code.google.com by narma....@gmail.com on 11 Apr 2008 at 9:45

Attachments:

GoogleCodeExporter commented 9 years ago
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;

Original comment by narma....@gmail.com on 13 Apr 2008 at 3:00

GoogleCodeExporter commented 9 years ago
"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)

Original comment by narma....@gmail.com on 13 Apr 2008 at 3:04

GoogleCodeExporter commented 9 years ago
Duplicate of #15.

Original comment by rwpoul...@gmail.com on 15 Apr 2008 at 12:44