· 8 years ago · Dec 16, 2017, 01:46 PM
1-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
2--
3-- Host: localhost Database: cometchat
4-- ------------------------------------------------------
5-- Server version 5.7.20-0ubuntu0.16.04.1
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `cometchat`
20--
21
22DROP TABLE IF EXISTS `cometchat`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `cometchat` (
26 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
27 `from` int(10) unsigned NOT NULL,
28 `to` int(10) unsigned NOT NULL,
29 `message` text NOT NULL,
30 `sent` int(10) unsigned NOT NULL DEFAULT '0',
31 `read` tinyint(1) unsigned NOT NULL DEFAULT '0',
32 `direction` tinyint(1) unsigned NOT NULL DEFAULT '0',
33 PRIMARY KEY (`id`),
34 KEY `to` (`to`),
35 KEY `from` (`from`),
36 KEY `direction` (`direction`),
37 KEY `read` (`read`),
38 KEY `sent` (`sent`)
39) ENGINE=InnoDB AUTO_INCREMENT=39538 DEFAULT CHARSET=utf8;
40/*!40101 SET character_set_client = @saved_cs_client */;
41
42--
43-- Table structure for table `cometchat_announcements`
44--
45
46DROP TABLE IF EXISTS `cometchat_announcements`;
47/*!40101 SET @saved_cs_client = @@character_set_client */;
48/*!40101 SET character_set_client = utf8 */;
49CREATE TABLE `cometchat_announcements` (
50 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
51 `announcement` text NOT NULL,
52 `time` int(10) unsigned NOT NULL,
53 `to` int(10) NOT NULL,
54 `recd` int(1) NOT NULL DEFAULT '0',
55 PRIMARY KEY (`id`),
56 KEY `to` (`to`),
57 KEY `time` (`time`),
58 KEY `to_id` (`to`,`id`)
59) ENGINE=InnoDB DEFAULT CHARSET=utf8;
60/*!40101 SET character_set_client = @saved_cs_client */;
61
62--
63-- Table structure for table `cometchat_block`
64--
65
66DROP TABLE IF EXISTS `cometchat_block`;
67/*!40101 SET @saved_cs_client = @@character_set_client */;
68/*!40101 SET character_set_client = utf8 */;
69CREATE TABLE `cometchat_block` (
70 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
71 `fromid` int(10) unsigned NOT NULL,
72 `toid` int(10) unsigned NOT NULL,
73 PRIMARY KEY (`id`),
74 KEY `fromid` (`fromid`),
75 KEY `toid` (`toid`),
76 KEY `fromid_toid` (`fromid`,`toid`)
77) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
78/*!40101 SET character_set_client = @saved_cs_client */;
79
80--
81-- Table structure for table `cometchat_bots`
82--
83
84DROP TABLE IF EXISTS `cometchat_bots`;
85/*!40101 SET @saved_cs_client = @@character_set_client */;
86/*!40101 SET character_set_client = utf8 */;
87CREATE TABLE `cometchat_bots` (
88 `id` int(11) NOT NULL AUTO_INCREMENT,
89 `name` varchar(100) CHARACTER SET utf8 NOT NULL,
90 `description` text CHARACTER SET utf8 NOT NULL,
91 `keywords` text CHARACTER SET utf8,
92 `avatar` varchar(200) NOT NULL,
93 `apikey` varchar(200) CHARACTER SET utf8 NOT NULL,
94 PRIMARY KEY (`id`),
95 UNIQUE KEY `name` (`name`)
96) ENGINE=InnoDB DEFAULT CHARSET=latin1;
97/*!40101 SET character_set_client = @saved_cs_client */;
98
99--
100-- Table structure for table `cometchat_chatroommessages`
101--
102
103DROP TABLE IF EXISTS `cometchat_chatroommessages`;
104/*!40101 SET @saved_cs_client = @@character_set_client */;
105/*!40101 SET character_set_client = utf8 */;
106CREATE TABLE `cometchat_chatroommessages` (
107 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
108 `userid` int(10) unsigned NOT NULL,
109 `chatroomid` int(10) unsigned NOT NULL,
110 `message` text NOT NULL,
111 `sent` int(10) unsigned NOT NULL,
112 PRIMARY KEY (`id`),
113 KEY `userid` (`userid`),
114 KEY `chatroomid` (`chatroomid`),
115 KEY `sent` (`sent`)
116) ENGINE=InnoDB DEFAULT CHARSET=utf8;
117/*!40101 SET character_set_client = @saved_cs_client */;
118
119--
120-- Table structure for table `cometchat_chatrooms`
121--
122
123DROP TABLE IF EXISTS `cometchat_chatrooms`;
124/*!40101 SET @saved_cs_client = @@character_set_client */;
125/*!40101 SET character_set_client = utf8 */;
126CREATE TABLE `cometchat_chatrooms` (
127 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
128 `name` varchar(255) NOT NULL,
129 `lastactivity` int(10) unsigned NOT NULL,
130 `createdby` int(10) unsigned NOT NULL,
131 `password` varchar(255) NOT NULL,
132 `type` tinyint(1) unsigned NOT NULL,
133 `vidsession` varchar(512) DEFAULT NULL,
134 `invitedusers` varchar(512) DEFAULT NULL,
135 `guid` varchar(255) DEFAULT NULL,
136 PRIMARY KEY (`id`),
137 KEY `lastactivity` (`lastactivity`),
138 KEY `createdby` (`createdby`),
139 KEY `type` (`type`)
140) ENGINE=InnoDB DEFAULT CHARSET=utf8;
141/*!40101 SET character_set_client = @saved_cs_client */;
142
143--
144-- Table structure for table `cometchat_chatrooms_users`
145--
146
147DROP TABLE IF EXISTS `cometchat_chatrooms_users`;
148/*!40101 SET @saved_cs_client = @@character_set_client */;
149/*!40101 SET character_set_client = utf8 */;
150CREATE TABLE `cometchat_chatrooms_users` (
151 `userid` int(10) unsigned NOT NULL,
152 `chatroomid` int(10) unsigned NOT NULL,
153 `isbanned` int(1) DEFAULT '0',
154 PRIMARY KEY (`userid`,`chatroomid`) USING BTREE,
155 KEY `chatroomid` (`chatroomid`),
156 KEY `userid` (`userid`),
157 KEY `userid_chatroomid` (`chatroomid`,`userid`)
158) ENGINE=InnoDB DEFAULT CHARSET=utf8;
159/*!40101 SET character_set_client = @saved_cs_client */;
160
161--
162-- Table structure for table `cometchat_colors`
163--
164
165DROP TABLE IF EXISTS `cometchat_colors`;
166/*!40101 SET @saved_cs_client = @@character_set_client */;
167/*!40101 SET character_set_client = utf8 */;
168CREATE TABLE `cometchat_colors` (
169 `color_key` varchar(100) NOT NULL,
170 `color_value` text NOT NULL,
171 `color` varchar(50) NOT NULL,
172 UNIQUE KEY `color_index` (`color_key`,`color`)
173) ENGINE=InnoDB DEFAULT CHARSET=utf8;
174/*!40101 SET character_set_client = @saved_cs_client */;
175
176--
177-- Table structure for table `cometchat_guests`
178--
179
180DROP TABLE IF EXISTS `cometchat_guests`;
181/*!40101 SET @saved_cs_client = @@character_set_client */;
182/*!40101 SET character_set_client = utf8 */;
183CREATE TABLE `cometchat_guests` (
184 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
185 `name` varchar(255) NOT NULL,
186 PRIMARY KEY (`id`)
187) ENGINE=InnoDB AUTO_INCREMENT=11779467 DEFAULT CHARSET=utf8;
188/*!40101 SET character_set_client = @saved_cs_client */;
189
190--
191-- Table structure for table `cometchat_languages`
192--
193
194DROP TABLE IF EXISTS `cometchat_languages`;
195/*!40101 SET @saved_cs_client = @@character_set_client */;
196/*!40101 SET character_set_client = utf8 */;
197CREATE TABLE `cometchat_languages` (
198 `lang_key` varchar(255) NOT NULL COMMENT 'Key of a language variable',
199 `lang_text` text NOT NULL COMMENT 'Text/value of a language variable',
200 `code` varchar(20) NOT NULL COMMENT 'Language code for e.g. en for English',
201 `type` varchar(20) NOT NULL COMMENT 'Type of CometChat add on for e.g. module/plugin/extension/function',
202 `name` varchar(50) NOT NULL COMMENT 'Name of add on for e.g. announcement,smilies, etc.',
203 UNIQUE KEY `lang_index` (`lang_key`,`code`,`type`,`name`) USING BTREE
204) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores all CometChat languages';
205/*!40101 SET character_set_client = @saved_cs_client */;
206
207--
208-- Table structure for table `cometchat_messages_old_1498082868`
209--
210
211DROP TABLE IF EXISTS `cometchat_messages_old_1498082868`;
212/*!40101 SET @saved_cs_client = @@character_set_client */;
213/*!40101 SET character_set_client = utf8 */;
214CREATE TABLE `cometchat_messages_old_1498082868` (
215 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
216 `from` int(10) unsigned NOT NULL,
217 `to` int(10) unsigned NOT NULL,
218 `message` text NOT NULL,
219 `sent` int(10) unsigned NOT NULL DEFAULT '0',
220 `read` tinyint(1) unsigned NOT NULL DEFAULT '0',
221 `direction` tinyint(1) unsigned NOT NULL DEFAULT '0',
222 PRIMARY KEY (`id`),
223 KEY `to` (`to`),
224 KEY `from` (`from`),
225 KEY `direction` (`direction`),
226 KEY `read` (`read`),
227 KEY `sent` (`sent`)
228) ENGINE=InnoDB DEFAULT CHARSET=utf8;
229/*!40101 SET character_set_client = @saved_cs_client */;
230
231--
232-- Table structure for table `cometchat_recentconversation`
233--
234
235DROP TABLE IF EXISTS `cometchat_recentconversation`;
236/*!40101 SET @saved_cs_client = @@character_set_client */;
237/*!40101 SET character_set_client = utf8 */;
238CREATE TABLE `cometchat_recentconversation` (
239 `convo_id` varchar(100) NOT NULL,
240 `id` int(10) unsigned NOT NULL,
241 `from` int(10) unsigned NOT NULL,
242 `to` int(10) unsigned NOT NULL,
243 `message` text NOT NULL,
244 `sent` varchar(100) NOT NULL,
245 UNIQUE KEY `convo_id` (`convo_id`),
246 KEY `fromid` (`from`),
247 KEY `toid` (`to`),
248 KEY `fromid_toid` (`from`,`to`)
249) ENGINE=InnoDB DEFAULT CHARSET=utf8;
250/*!40101 SET character_set_client = @saved_cs_client */;
251
252--
253-- Table structure for table `cometchat_session`
254--
255
256DROP TABLE IF EXISTS `cometchat_session`;
257/*!40101 SET @saved_cs_client = @@character_set_client */;
258/*!40101 SET character_set_client = utf8 */;
259CREATE TABLE `cometchat_session` (
260 `session_id` char(32) NOT NULL,
261 `session_data` text NOT NULL,
262 `session_lastaccesstime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
263 PRIMARY KEY (`session_id`)
264) ENGINE=InnoDB DEFAULT CHARSET=utf8;
265/*!40101 SET character_set_client = @saved_cs_client */;
266
267--
268-- Table structure for table `cometchat_settings`
269--
270
271DROP TABLE IF EXISTS `cometchat_settings`;
272/*!40101 SET @saved_cs_client = @@character_set_client */;
273/*!40101 SET character_set_client = utf8 */;
274CREATE TABLE `cometchat_settings` (
275 `setting_key` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Configuration setting name. It can be PHP constant, variable or array',
276 `value` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Value of the key.',
277 `key_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'States whether the key is: 0 = PHP constant, 1 = atomic variable or 2 = serialized associative array.',
278 PRIMARY KEY (`setting_key`)
279) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Stores all the configuration settings for CometChat';
280/*!40101 SET character_set_client = @saved_cs_client */;
281
282--
283-- Table structure for table `cometchat_status`
284--
285
286DROP TABLE IF EXISTS `cometchat_status`;
287/*!40101 SET @saved_cs_client = @@character_set_client */;
288/*!40101 SET character_set_client = utf8 */;
289CREATE TABLE `cometchat_status` (
290 `userid` int(10) unsigned NOT NULL,
291 `message` text,
292 `status` enum('available','away','busy','invisible','offline') DEFAULT NULL,
293 `typingto` int(10) unsigned DEFAULT NULL,
294 `typingtime` int(10) unsigned DEFAULT NULL,
295 `isdevice` int(1) unsigned NOT NULL DEFAULT '0',
296 `lastactivity` int(10) unsigned NOT NULL DEFAULT '0',
297 `lastseen` int(10) unsigned NOT NULL DEFAULT '0',
298 `lastseensetting` int(1) unsigned NOT NULL DEFAULT '0',
299 `readreceiptsetting` int(1) unsigned NOT NULL DEFAULT '1',
300 PRIMARY KEY (`userid`),
301 KEY `typingto` (`typingto`),
302 KEY `typingtime` (`typingtime`),
303 KEY `lastactivityandstatus` (`lastactivity`,`status`,`isdevice`)
304) ENGINE=InnoDB DEFAULT CHARSET=utf8;
305/*!40101 SET character_set_client = @saved_cs_client */;
306
307--
308-- Table structure for table `cometchat_users`
309--
310
311DROP TABLE IF EXISTS `cometchat_users`;
312/*!40101 SET @saved_cs_client = @@character_set_client */;
313/*!40101 SET character_set_client = utf8 */;
314CREATE TABLE `cometchat_users` (
315 `userid` int(11) NOT NULL AUTO_INCREMENT,
316 `username` varchar(100) CHARACTER SET utf8 NOT NULL,
317 `displayname` varchar(100) CHARACTER SET utf8 NOT NULL,
318 `password` varchar(100) CHARACTER SET utf8 NOT NULL,
319 `avatar` varchar(200) NOT NULL,
320 `link` varchar(200) NOT NULL,
321 `grp` varchar(25) NOT NULL,
322 `friends` text NOT NULL,
323 `uid` varchar(255) NOT NULL,
324 PRIMARY KEY (`userid`),
325 UNIQUE KEY `username` (`username`)
326) ENGINE=InnoDB DEFAULT CHARSET=latin1;
327/*!40101 SET character_set_client = @saved_cs_client */;
328
329--
330-- Table structure for table `cometchat_videochatsessions`
331--
332
333DROP TABLE IF EXISTS `cometchat_videochatsessions`;
334/*!40101 SET @saved_cs_client = @@character_set_client */;
335/*!40101 SET character_set_client = utf8 */;
336CREATE TABLE `cometchat_videochatsessions` (
337 `username` varchar(255) NOT NULL,
338 `identity` varchar(255) NOT NULL,
339 `timestamp` int(10) unsigned DEFAULT '0',
340 PRIMARY KEY (`username`),
341 KEY `username` (`username`),
342 KEY `identity` (`identity`),
343 KEY `timestamp` (`timestamp`)
344) ENGINE=InnoDB DEFAULT CHARSET=utf8;
345/*!40101 SET character_set_client = @saved_cs_client */;
346
347--
348-- Table structure for table `users`
349--
350
351DROP TABLE IF EXISTS `users`;
352/*!40101 SET @saved_cs_client = @@character_set_client */;
353/*!40101 SET character_set_client = utf8 */;
354CREATE TABLE `users` (
355 `userid` int(10) NOT NULL AUTO_INCREMENT,
356 `username` varchar(50) NOT NULL,
357 PRIMARY KEY (`userid`)
358) ENGINE=InnoDB DEFAULT CHARSET=latin1;
359/*!40101 SET character_set_client = @saved_cs_client */;
360/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
361
362/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
363/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
364/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
365/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
366/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
367/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
368/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
369
370-- Dump completed on 2017-12-16 13:43:41