Skip to content

Commit fdd4a5c

Browse files
authored
Create wp_bbp_engaged_topics.sql
1 parent db0a426 commit fdd4a5c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tables/wp_bbp_engaged_topics.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* bbp_engaged_topics
2+
this table connects user to the topic. Unique index placed on the user/topic combination.
3+
*/
4+
5+
CREATE TABLE `wp_bbp_engaged_topics` (
6+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
7+
`user_id` BIGINT UNSIGNED NOT NULL COMMENT 'Connects to ID in the wp_users table.',
8+
`topic_id` BIGINT UNSIGNED NOT NULL COMMENT 'Connects to ID in the wp_posts table for the post_type = \'topic\'.',
9+
`engaged` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
10+
PRIMARY KEY (`id`),
11+
INDEX `user_id` (`user_id`),
12+
INDEX `topic_id` (`topic_id`),
13+
INDEX `engaged` (`engaged`),
14+
UNIQUE INDEX `user_topic` (`user_id`, `topic_id`))
15+
ENGINE = InnoDB;

0 commit comments

Comments
 (0)