mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Latest sql file
This commit is contained in:
parent
0ad9259c6f
commit
744cc98690
@ -1,32 +1,19 @@
|
|||||||
/*
|
SET
|
||||||
Navicat MySQL Data Transfer
|
FOREIGN_KEY_CHECKS=0;
|
||||||
|
|
||||||
Source Server :
|
|
||||||
Source Server Version : 50733
|
|
||||||
Source Host :
|
|
||||||
Source Database : openIM
|
|
||||||
|
|
||||||
Target Server Type : MYSQL
|
|
||||||
Target Server Version : 50733
|
|
||||||
File Encoding : 65001
|
|
||||||
|
|
||||||
Date: 2021-05-27 15:08:23
|
|
||||||
*/
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for `account`
|
-- Table structure for `account`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `account`;
|
DROP TABLE IF EXISTS `account`;
|
||||||
CREATE TABLE `account` (
|
CREATE TABLE `account`
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
(
|
||||||
`uid` varchar(32) NOT NULL,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`account` varchar(255) NOT NULL,
|
`uid` varchar(32) NOT NULL,
|
||||||
`password` varchar(255) NOT NULL,
|
`account` varchar(255) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
`password` varchar(255) NOT NULL,
|
||||||
UNIQUE KEY `uk_account` (`account`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
UNIQUE KEY `uk_account` (`account`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of account
|
-- Records of account
|
||||||
@ -36,13 +23,14 @@ CREATE TABLE `account` (
|
|||||||
-- Table structure for `black_list`
|
-- Table structure for `black_list`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `black_list`;
|
DROP TABLE IF EXISTS `black_list`;
|
||||||
CREATE TABLE `black_list` (
|
CREATE TABLE `black_list`
|
||||||
`uid` varchar(32) NOT NULL,
|
(
|
||||||
`begin_disable_time` datetime NOT NULL,
|
`uid` varchar(32) NOT NULL COMMENT 'uid',
|
||||||
`end_disable_time` datetime NOT NULL,
|
`begin_disable_time` datetime DEFAULT NULL,
|
||||||
`ex` varchar(1024) DEFAULT NULL,
|
`end_disable_time` datetime DEFAULT NULL,
|
||||||
PRIMARY KEY (`uid`)
|
`ex` varchar(1024) DEFAULT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
PRIMARY KEY (`uid`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of black_list
|
-- Records of black_list
|
||||||
@ -52,19 +40,20 @@ CREATE TABLE `black_list` (
|
|||||||
-- Table structure for `chat_log`
|
-- Table structure for `chat_log`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `chat_log`;
|
DROP TABLE IF EXISTS `chat_log`;
|
||||||
CREATE TABLE `chat_log` (
|
CREATE TABLE `chat_log`
|
||||||
`msg_id` varchar(128) NOT NULL,
|
(
|
||||||
`send_id` varchar(255) NOT NULL,
|
`msg_id` varchar(128) NOT NULL,
|
||||||
`session_type` int(11) NOT NULL,
|
`send_id` varchar(255) NOT NULL,
|
||||||
`recv_id` varchar(255) NOT NULL,
|
`session_type` int(11) NOT NULL,
|
||||||
`content_type` int(11) NOT NULL,
|
`recv_id` varchar(255) NOT NULL,
|
||||||
`msg_from` int(11) NOT NULL,
|
`content_type` int(11) NOT NULL,
|
||||||
`content` varchar(1000) NOT NULL,
|
`msg_from` int(11) NOT NULL,
|
||||||
`remark` varchar(100) DEFAULT NULL,
|
`content` varchar(1000) NOT NULL,
|
||||||
`sender_platform_id` int(11) NOT NULL,
|
`remark` varchar(100) DEFAULT NULL,
|
||||||
`send_time` datetime NOT NULL,
|
`sender_platform_id` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`msg_id`)
|
`send_time` datetime NOT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
PRIMARY KEY (`msg_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of chat_log
|
-- Records of chat_log
|
||||||
@ -74,14 +63,15 @@ CREATE TABLE `chat_log` (
|
|||||||
-- Table structure for `friend`
|
-- Table structure for `friend`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `friend`;
|
DROP TABLE IF EXISTS `friend`;
|
||||||
CREATE TABLE `friend` (
|
CREATE TABLE `friend`
|
||||||
`owner_id` varchar(255) NOT NULL,
|
(
|
||||||
`friend_id` varchar(255) NOT NULL,
|
`owner_id` varchar(255) NOT NULL,
|
||||||
`comment` varchar(255) DEFAULT NULL,
|
`friend_id` varchar(255) NOT NULL,
|
||||||
`friend_flag` int(11) NOT NULL,
|
`comment` varchar(255) DEFAULT NULL,
|
||||||
`create_time` datetime NOT NULL,
|
`friend_flag` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`owner_id`,`friend_id`)
|
`create_time` datetime NOT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
PRIMARY KEY (`owner_id`, `friend_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of friend
|
-- Records of friend
|
||||||
@ -91,14 +81,15 @@ CREATE TABLE `friend` (
|
|||||||
-- Table structure for `friend_request`
|
-- Table structure for `friend_request`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `friend_request`;
|
DROP TABLE IF EXISTS `friend_request`;
|
||||||
CREATE TABLE `friend_request` (
|
CREATE TABLE `friend_request`
|
||||||
`req_id` varchar(255) NOT NULL,
|
(
|
||||||
`user_id` varchar(255) NOT NULL,
|
`req_id` varchar(255) NOT NULL,
|
||||||
`flag` int(11) NOT NULL DEFAULT '0',
|
`user_id` varchar(255) NOT NULL,
|
||||||
`req_message` varchar(255) DEFAULT NULL,
|
`flag` int(11) NOT NULL DEFAULT '0',
|
||||||
`create_time` datetime NOT NULL,
|
`req_message` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`user_id`,`req_id`)
|
`create_time` datetime NOT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
PRIMARY KEY (`user_id`, `req_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of friend_request
|
-- Records of friend_request
|
||||||
@ -108,13 +99,17 @@ CREATE TABLE `friend_request` (
|
|||||||
-- Table structure for `group`
|
-- Table structure for `group`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `group`;
|
DROP TABLE IF EXISTS `group`;
|
||||||
CREATE TABLE `group` (
|
CREATE TABLE `group`
|
||||||
`group_id` varchar(255) NOT NULL,
|
(
|
||||||
`name` varchar(255) NOT NULL,
|
`group_id` varchar(255) NOT NULL,
|
||||||
`head_url` varchar(255) DEFAULT NULL,
|
`name` varchar(255) DEFAULT NULL,
|
||||||
`bulletin` varchar(255) DEFAULT NULL,
|
`introduction` varchar(255) DEFAULT NULL,
|
||||||
UNIQUE KEY `uk_group_id` (`group_id`)
|
`notification` varchar(255) DEFAULT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
`face_url` varchar(255) DEFAULT NULL,
|
||||||
|
`create_time` datetime DEFAULT NULL,
|
||||||
|
`ex` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`group_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of group
|
-- Records of group
|
||||||
@ -124,30 +119,60 @@ CREATE TABLE `group` (
|
|||||||
-- Table structure for `group_member`
|
-- Table structure for `group_member`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `group_member`;
|
DROP TABLE IF EXISTS `group_member`;
|
||||||
CREATE TABLE `group_member` (
|
CREATE TABLE `group_member`
|
||||||
`group_id` varchar(255) NOT NULL,
|
(
|
||||||
`user_id` varchar(255) NOT NULL,
|
`group_id` varchar(255) NOT NULL,
|
||||||
`nickname` varchar(255) DEFAULT NULL,
|
`uid` varchar(255) NOT NULL,
|
||||||
`is_admin` int(11) NOT NULL,
|
`nickname` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`group_id`,`user_id`)
|
`user_group_face_url` varchar(255) DEFAULT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
`administrator_level` int(11) NOT NULL,
|
||||||
|
`join_time` datetime NOT NULL,
|
||||||
|
PRIMARY KEY (`group_id`, `uid`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of group_member
|
-- Records of group_member
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for `group_request`
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `group_request`;
|
||||||
|
CREATE TABLE `group_request`
|
||||||
|
(
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`group_id` varchar(255) NOT NULL,
|
||||||
|
`from_user_id` varchar(255) NOT NULL,
|
||||||
|
`to_user_id` varchar(255) NOT NULL,
|
||||||
|
`flag` int(10) NOT NULL DEFAULT '0',
|
||||||
|
`req_msg` varchar(255) DEFAULT '',
|
||||||
|
`handled_msg` varchar(255) DEFAULT '',
|
||||||
|
`create_time` datetime NOT NULL,
|
||||||
|
`from_user_nickname` varchar(255) DEFAULT '',
|
||||||
|
`to_user_nickname` varchar(255) DEFAULT NULL,
|
||||||
|
`from_user_face_url` varchar(255) DEFAULT '',
|
||||||
|
`to_user_face_url` varchar(255) DEFAULT '',
|
||||||
|
`handled_user` varchar(255) DEFAULT '',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of group_request
|
||||||
|
-- ----------------------------
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for `receive`
|
-- Table structure for `receive`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `receive`;
|
DROP TABLE IF EXISTS `receive`;
|
||||||
CREATE TABLE `receive` (
|
CREATE TABLE `receive`
|
||||||
`user_id` varchar(255) NOT NULL,
|
(
|
||||||
`seq` int(11) NOT NULL,
|
`user_id` varchar(255) NOT NULL,
|
||||||
`msg_id` varchar(128) NOT NULL,
|
`seq` int(11) NOT NULL,
|
||||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
`msg_id` varchar(128) NOT NULL,
|
||||||
PRIMARY KEY (`user_id`,`seq`) USING BTREE,
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
KEY `fk_msgid` (`msg_id`)
|
PRIMARY KEY (`user_id`, `seq`) USING BTREE,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
KEY `fk_msgid` (`msg_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of receive
|
-- Records of receive
|
||||||
@ -157,18 +182,19 @@ CREATE TABLE `receive` (
|
|||||||
-- Table structure for `user`
|
-- Table structure for `user`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `user`;
|
DROP TABLE IF EXISTS `user`;
|
||||||
CREATE TABLE `user` (
|
CREATE TABLE `user`
|
||||||
`uid` varchar(64) NOT NULL,
|
(
|
||||||
`name` varchar(64) DEFAULT NULL,
|
`uid` varchar(64) NOT NULL,
|
||||||
`icon` varchar(1024) DEFAULT NULL,
|
`name` varchar(64) DEFAULT NULL,
|
||||||
`gender` int(11) unsigned zerofill DEFAULT NULL,
|
`icon` varchar(1024) DEFAULT NULL,
|
||||||
`mobile` varchar(32) DEFAULT NULL,
|
`gender` int(11) unsigned zerofill DEFAULT NULL,
|
||||||
`birth` varchar(16) DEFAULT NULL,
|
`mobile` varchar(32) DEFAULT NULL,
|
||||||
`email` varchar(64) DEFAULT NULL,
|
`birth` varchar(16) DEFAULT NULL,
|
||||||
`ex` varchar(1024) DEFAULT NULL,
|
`email` varchar(64) DEFAULT NULL,
|
||||||
`create_time` datetime NOT NULL,
|
`ex` varchar(1024) DEFAULT NULL,
|
||||||
PRIMARY KEY (`uid`),
|
`create_time` datetime DEFAULT NULL,
|
||||||
UNIQUE KEY `uk_uid` (`uid`)
|
PRIMARY KEY (`uid`),
|
||||||
|
UNIQUE KEY `uk_uid` (`uid`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -179,12 +205,13 @@ CREATE TABLE `user` (
|
|||||||
-- Table structure for `user_black_list`
|
-- Table structure for `user_black_list`
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `user_black_list`;
|
DROP TABLE IF EXISTS `user_black_list`;
|
||||||
CREATE TABLE `user_black_list` (
|
CREATE TABLE `user_black_list`
|
||||||
`owner_id` varchar(255) NOT NULL,
|
(
|
||||||
`block_id` varchar(255) NOT NULL,
|
`owner_id` varchar(255) NOT NULL,
|
||||||
`create_time` datetime NOT NULL,
|
`block_id` varchar(255) NOT NULL,
|
||||||
PRIMARY KEY (`owner_id`,`block_id`)
|
`create_time` datetime NOT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
PRIMARY KEY (`owner_id`, `block_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of user_black_list
|
-- Records of user_black_list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user