video.sql
2 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/3/13 15:45:38 */
/*==============================================================*/
drop index farm_video_ipc_index on ys7_device_ipc;
drop table if exists ys7_device_ipc;
drop index farm_sub_account_index on ys7_sub_account;
drop table if exists ys7_sub_account;
/*==============================================================*/
/* Table: ys7_device_ipc */
/*==============================================================*/
create table ys7_device_ipc
(
di_id bigint not null auto_increment,
device_serial varchar(64),
device_name varchar(64),
validate_code varchar(32),
farm_id bigint,
create_date_time bigint,
primary key (di_id)
);
alter table ys7_device_ipc comment 'ipc设备表';
/*==============================================================*/
/* Index: farm_video_ipc_index */
/*==============================================================*/
create index farm_video_ipc_index on ys7_device_ipc
(
farm_id
);
/*==============================================================*/
/* Table: ys7_sub_account */
/*==============================================================*/
create table ys7_sub_account
(
sa_id bigint not null auto_increment,
account_id varchar(32),
access_token varchar(64),
expire_date_time bigint,
farm_id bigint,
primary key (sa_id)
);
alter table ys7_sub_account comment '视频设备子账户表';
/*==============================================================*/
/* Index: farm_sub_account_index */
/*==============================================================*/
create index farm_sub_account_index on ys7_sub_account
(
farm_id
);