Skip to content

Commit 3c5be3d

Browse files
authored
Update wp_bbp_topics.sql
1 parent 89f8e7d commit 3c5be3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

generate/inserts/wp_bbp_topics.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Insert initial topic/forum combinations */
2-
INSERT INTO wp_bbp_topics (`topic_id`, `forum_id`) (
2+
INSERT INTO wp_bbp_topics (`topic_id`, `forum_id`, `last_active_id`) (
33
SELECT
44
t.ID AS topic_id,
5-
f.ID AS forum_id
5+
f.ID AS forum_id,
6+
t.ID AS last_active_id
67
FROM wp_posts t
78
INNER JOIN wp_posts f ON f.ID = t.post_parent AND f.post_type = 'forum' AND f.post_status IN ('publish', 'private', 'hidden')
89
WHERE t.post_type = 'topic' AND t.post_status IN ('publish', 'closed', 'pending', 'trash', 'spam'));
10+

0 commit comments

Comments
 (0)