The phpBB database has a forum_id field in the posts table as well as a forum_id field in the topics table. I would like clarification as to whether this is an intended part of the design, or just an historical artefact?
Is there any intended scenario where the post and its topic will have different forum_ids?
forum_id in posts table
Re: forum_id in posts table
Post and its topic always have the same parent forum_id.
I guess that was made to make related SQL queries lighter.
I guess that was made to make related SQL queries lighter.
Re: forum_id in posts table
Isn't it because a shadow topic could reside in a different forum?
Procrastination is my hobby, but I keep on postponing it.
Re: forum_id in posts table
So is it more precise to say that post.forum_id is the forum where the post was originally made and topic.forum_id is the forum where the post currently resides?
I have always used topic.forum_id, but I think that here are a few places in extensions (and even core code) that assume that post.forum_id is the current forum.
I have always used topic.forum_id, but I think that here are a few places in extensions (and even core code) that assume that post.forum_id is the current forum.
Re: forum_id in posts table
Nope. post.forum_id and its topic.forum_id are identical. When the post's parent topic get moved to another forum, the posts's forum_ig get updated.