We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db0a426 commit fdd4a5cCopy full SHA for fdd4a5c
tables/wp_bbp_engaged_topics.sql
@@ -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