diff options
author | Vitaly Takmazov | 2018-04-12 18:18:09 +0000 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-12 18:18:09 +0000 |
commit | b10b6241f5c8d5ff060826df1a7d20d1ccdb587f (patch) | |
tree | 16e5f055cb1bb7e81c446ee042093dff31db5e33 /juick-server-jdbc/src/main/resources/juick.sql | |
parent | c148012c714cb43d9d7277a54151ab5c2fa7b7d4 (diff) |
mysql schema update
Diffstat (limited to 'juick-server-jdbc/src/main/resources/juick.sql')
-rw-r--r-- | juick-server-jdbc/src/main/resources/juick.sql | 14 |
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 |