mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-22 05:17:49 +08:00
1078-调整数据库建表语句
This commit is contained in:
parent
942a41c630
commit
7ffe773175
@ -31,7 +31,6 @@ create table wvp_device (
|
|||||||
password character varying(255),
|
password character varying(255),
|
||||||
as_message_channel bool default false,
|
as_message_channel bool default false,
|
||||||
keepalive_interval_time integer,
|
keepalive_interval_time integer,
|
||||||
switch_primary_sub_stream bool default false,
|
|
||||||
broadcast_push_after_ack bool default false,
|
broadcast_push_after_ack bool default false,
|
||||||
constraint uk_device_device unique (device_id)
|
constraint uk_device_device unique (device_id)
|
||||||
);
|
);
|
||||||
@ -155,8 +154,13 @@ create table wvp_media_server (
|
|||||||
rtp_proxy_port integer,
|
rtp_proxy_port integer,
|
||||||
rtsp_port integer,
|
rtsp_port integer,
|
||||||
rtsp_ssl_port integer,
|
rtsp_ssl_port integer,
|
||||||
|
flv_port integer,
|
||||||
|
flv_ssl_port integer,
|
||||||
|
ws_flv_port integer,
|
||||||
|
ws_flv_ssl_port integer,
|
||||||
auto_config bool default false,
|
auto_config bool default false,
|
||||||
secret character varying(50),
|
secret character varying(50),
|
||||||
|
type character varying(50) default 'zlm',
|
||||||
rtp_enable bool default false,
|
rtp_enable bool default false,
|
||||||
rtp_port_range character varying(50),
|
rtp_port_range character varying(50),
|
||||||
send_rtp_port_range character varying(50),
|
send_rtp_port_range character varying(50),
|
||||||
@ -167,6 +171,7 @@ create table wvp_media_server (
|
|||||||
hook_alive_interval integer,
|
hook_alive_interval integer,
|
||||||
record_path character varying(255),
|
record_path character varying(255),
|
||||||
record_day integer default 7,
|
record_day integer default 7,
|
||||||
|
transcode_suffix character varying(255),
|
||||||
constraint uk_media_server_unique_ip_http_port unique (ip, http_port)
|
constraint uk_media_server_unique_ip_http_port unique (ip, http_port)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -198,6 +203,7 @@ create table wvp_platform (
|
|||||||
update_time character varying(50),
|
update_time character varying(50),
|
||||||
as_message_channel bool default false,
|
as_message_channel bool default false,
|
||||||
auto_push_channel bool default false,
|
auto_push_channel bool default false,
|
||||||
|
send_stream_ip character varying(50),
|
||||||
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -315,27 +321,40 @@ create table wvp_resources_tree (
|
|||||||
path character varying(255)
|
path character varying(255)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table wvp_jt_terminal (
|
create table wvp_user_api_key (
|
||||||
id serial primary key,
|
id serial primary key ,
|
||||||
phone_number character varying(50),
|
user_id bigint,
|
||||||
terminal_id character varying(50),
|
app character varying(255) ,
|
||||||
province_id character varying(50),
|
api_key text,
|
||||||
province_text character varying(100),
|
expired_at bigint,
|
||||||
city_id character varying(50),
|
remark character varying(255),
|
||||||
city_text character varying(100),
|
enable bool default true,
|
||||||
maker_id character varying(50),
|
create_time character varying(50),
|
||||||
model character varying(50),
|
update_time character varying(50)
|
||||||
plate_color character varying(50),
|
|
||||||
plate_no character varying(50),
|
|
||||||
authentication_code character varying(255),
|
|
||||||
longitude double precision,
|
|
||||||
latitude double precision,
|
|
||||||
status bool default false,
|
|
||||||
register_time character varying(50) default null,
|
|
||||||
update_time character varying(50) not null,
|
|
||||||
create_time character varying(50) not null,
|
|
||||||
constraint uk_jt_device_id_device_id unique (id, phone_number)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table wvp_jt_terminal (
|
||||||
|
id serial primary key,
|
||||||
|
phone_number character varying(50),
|
||||||
|
terminal_id character varying(50),
|
||||||
|
province_id character varying(50),
|
||||||
|
province_text character varying(100),
|
||||||
|
city_id character varying(50),
|
||||||
|
city_text character varying(100),
|
||||||
|
maker_id character varying(50),
|
||||||
|
model character varying(50),
|
||||||
|
plate_color character varying(50),
|
||||||
|
plate_no character varying(50),
|
||||||
|
authentication_code character varying(255),
|
||||||
|
longitude double precision,
|
||||||
|
latitude double precision,
|
||||||
|
status bool default false,
|
||||||
|
register_time character varying(50) default null,
|
||||||
|
update_time character varying(50) not null,
|
||||||
|
create_time character varying(50) not null,
|
||||||
|
constraint uk_jt_device_id_device_id unique (id, phone_number)
|
||||||
|
);
|
||||||
|
|
||||||
create table wvp_jt_channel (
|
create table wvp_jt_channel (
|
||||||
id serial primary key,
|
id serial primary key,
|
||||||
terminal_db_id integer,
|
terminal_db_id integer,
|
||||||
@ -346,7 +365,6 @@ create table wvp_jt_channel (
|
|||||||
create_time character varying(50) not null,
|
create_time character varying(50) not null,
|
||||||
constraint uk_jt_device_id_device_id unique (terminal_db_id, channel_id)
|
constraint uk_jt_device_id_device_id unique (terminal_db_id, channel_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
/*初始数据*/
|
/*初始数据*/
|
||||||
INSERT INTO wvp_user VALUES (1, 'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57','3e80d1762a324d5b0ff636e0bd16f1e3');
|
INSERT INTO wvp_user VALUES (1, 'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57','3e80d1762a324d5b0ff636e0bd16f1e3');
|
||||||
INSERT INTO wvp_user_role VALUES (1, 'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
INSERT INTO wvp_user_role VALUES (1, 'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
||||||
@ -31,7 +31,6 @@ create table wvp_device (
|
|||||||
password character varying(255),
|
password character varying(255),
|
||||||
as_message_channel bool default false,
|
as_message_channel bool default false,
|
||||||
keepalive_interval_time integer,
|
keepalive_interval_time integer,
|
||||||
switch_primary_sub_stream bool default false,
|
|
||||||
broadcast_push_after_ack bool default false,
|
broadcast_push_after_ack bool default false,
|
||||||
constraint uk_device_device unique (device_id)
|
constraint uk_device_device unique (device_id)
|
||||||
);
|
);
|
||||||
@ -155,8 +154,13 @@ create table wvp_media_server (
|
|||||||
rtp_proxy_port integer,
|
rtp_proxy_port integer,
|
||||||
rtsp_port integer,
|
rtsp_port integer,
|
||||||
rtsp_ssl_port integer,
|
rtsp_ssl_port integer,
|
||||||
|
flv_port integer,
|
||||||
|
flv_ssl_port integer,
|
||||||
|
ws_flv_port integer,
|
||||||
|
ws_flv_ssl_port integer,
|
||||||
auto_config bool default false,
|
auto_config bool default false,
|
||||||
secret character varying(50),
|
secret character varying(50),
|
||||||
|
type character varying(50) default 'zlm',
|
||||||
rtp_enable bool default false,
|
rtp_enable bool default false,
|
||||||
rtp_port_range character varying(50),
|
rtp_port_range character varying(50),
|
||||||
send_rtp_port_range character varying(50),
|
send_rtp_port_range character varying(50),
|
||||||
@ -167,6 +171,7 @@ create table wvp_media_server (
|
|||||||
hook_alive_interval integer,
|
hook_alive_interval integer,
|
||||||
record_path character varying(255),
|
record_path character varying(255),
|
||||||
record_day integer default 7,
|
record_day integer default 7,
|
||||||
|
transcode_suffix character varying(255),
|
||||||
constraint uk_media_server_unique_ip_http_port unique (ip, http_port)
|
constraint uk_media_server_unique_ip_http_port unique (ip, http_port)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -198,6 +203,7 @@ create table wvp_platform (
|
|||||||
update_time character varying(50),
|
update_time character varying(50),
|
||||||
as_message_channel bool default false,
|
as_message_channel bool default false,
|
||||||
auto_push_channel bool default false,
|
auto_push_channel bool default false,
|
||||||
|
send_stream_ip character varying(50),
|
||||||
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -315,6 +321,18 @@ create table wvp_resources_tree (
|
|||||||
path character varying(255)
|
path character varying(255)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table wvp_user_api_key (
|
||||||
|
id serial primary key ,
|
||||||
|
user_id bigint,
|
||||||
|
app character varying(255) ,
|
||||||
|
api_key text,
|
||||||
|
expired_at bigint,
|
||||||
|
remark character varying(255),
|
||||||
|
enable bool default true,
|
||||||
|
create_time character varying(50),
|
||||||
|
update_time character varying(50)
|
||||||
|
);
|
||||||
|
|
||||||
create table wvp_jt_terminal (
|
create table wvp_jt_terminal (
|
||||||
id serial primary key,
|
id serial primary key,
|
||||||
phone_number character varying(50),
|
phone_number character varying(50),
|
||||||
@ -336,6 +354,7 @@ create table wvp_jt_terminal (
|
|||||||
create_time character varying(50) not null,
|
create_time character varying(50) not null,
|
||||||
constraint uk_jt_device_id_device_id unique (id, phone_number)
|
constraint uk_jt_device_id_device_id unique (id, phone_number)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table wvp_jt_channel (
|
create table wvp_jt_channel (
|
||||||
id serial primary key,
|
id serial primary key,
|
||||||
terminal_db_id integer,
|
terminal_db_id integer,
|
||||||
@ -346,7 +365,6 @@ create table wvp_jt_channel (
|
|||||||
create_time character varying(50) not null,
|
create_time character varying(50) not null,
|
||||||
constraint uk_jt_device_id_device_id unique (terminal_db_id, channel_id)
|
constraint uk_jt_device_id_device_id unique (terminal_db_id, channel_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
/*初始数据*/
|
/*初始数据*/
|
||||||
INSERT INTO wvp_user VALUES (1, 'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57','3e80d1762a324d5b0ff636e0bd16f1e3');
|
INSERT INTO wvp_user VALUES (1, 'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57','3e80d1762a324d5b0ff636e0bd16f1e3');
|
||||||
INSERT INTO wvp_user_role VALUES (1, 'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
INSERT INTO wvp_user_role VALUES (1, 'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
||||||
Loading…
Reference in New Issue
Block a user