aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/main/resources')
-rw-r--r--juick-server-jdbc/src/main/resources/juick.sql14
1 files changed, 9 insertions, 5 deletions
diff --git a/juick-server-jdbc/src/main/resources/juick.sql b/juick-server-jdbc/src/main/resources/juick.sql
index 123c0d27..e652cc19 100644
--- a/juick-server-jdbc/src/main/resources/juick.sql
+++ b/juick-server-jdbc/src/main/resources/juick.sql
@@ -372,7 +372,8 @@ CREATE TABLE `messages_txt` (
`tags` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`repliesby` varchar(96) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`txt` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
- PRIMARY KEY (`message_id`)
+ PRIMARY KEY (`message_id`),
+ FULLTEXT KEY `ft_idx` (`txt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -549,9 +550,10 @@ CREATE TABLE `replies` (
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`attach` enum('jpg','mp4','png') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`txt` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
+ KEY `ts` (`ts`),
KEY `message_id` (`message_id`),
- KEY `user_id` (`user_id`),
- KEY `ts` (`ts`)
+ KEY `uid` (`user_id`),
+ KEY `reply_indx` (`message_id`,`reply_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -579,7 +581,9 @@ DROP TABLE IF EXISTS `subscr_messages`;
CREATE TABLE `subscr_messages` (
`message_id` int(10) unsigned NOT NULL,
`suser_id` int(10) unsigned NOT NULL,
- UNIQUE KEY `message_id` (`message_id`,`suser_id`)
+ `last_read_rid` smallint(5) NOT NULL DEFAULT '0',
+ UNIQUE KEY `message_id` (`message_id`,`suser_id`),
+ KEY `last_read_indx` (`suser_id`,`last_read_rid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -910,4 +914,4 @@ CREATE TABLE `wl_users` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2018-01-12 6:45:30
+-- Dump completed on 2018-04-12 18:17:04