-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcreate_tables.sql
30 lines (25 loc) · 1.41 KB
/
create_tables.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
create database app_server character set utf8mb4;
create table app_user_info (
id bigint(20) AUTO_INCREMENT primary key,
user_account varchar(32) not null commit '用户的账号',
user_password varchar(32) commit '用户的密码',
chat_user_name varchar(32) not null commit '环信用户名',
agora_uid varchar(20) not null commit '声网用户id'
);
create table live_room_details (
id bigint not null comment '直播间ID,即对应的聊天室 ID,聊天室唯一标识符,由环信服务器生成',
name varchar(512) not null comment '直播间名称,即对应的聊天室名称,任意字符串',
description varchar(512) comment '直播间描述,即对应的聊天室描述,任意字符串',
created bigint comment '直播间创建时间戳',
owner varchar(512) comment '直播间主播的username,也是对应聊天室的所有者',
showid bigint comment '直播场次ID',
status integer comment '直播状态',
cover varchar(512) comment '直播间封面Url',
affiliations_count integer comment '直播间人数',
ext varchar(1024) comment '直播间扩展参数',
primary key (id),
index SHOW_STATUS (status)
) engine=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE live_room_details ADD persistent bit NOT NULL DEFAULT 1;
ALTER TABLE live_room_details ADD video_type integer NOT NULL DEFAULT 0;
ALTER TABLE live_room_details ADD channel varchar(64) NOT NULL;