/*==============================================================*/ /* 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 );