|  |  |  | 
|---|
|  |  |  | rename table user to wvp_user; | 
|---|
|  |  |  | rename table user_role to wvp_user_role; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | alter table wvp_device add column broadcast_push_after_ack bool default false; | 
|---|
|  |  |  | alter table wvp_device_channel add column custom_name varchar(255) null ; | 
|---|
|  |  |  | alter table wvp_device_channel add column custom_longitude double null ; | 
|---|
|  |  |  | alter table wvp_device_channel add column custom_latitude double null ; | 
|---|
|  |  |  | alter table wvp_device_channel add column custom_ptz_type int null ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | create table wvp_resources_tree ( | 
|---|
|  |  |  | id serial primary key , | 
|---|
|  |  |  | is_catalog bool default true, | 
|---|
|  |  |  | device_channel_id integer , | 
|---|
|  |  |  | gb_stream_id integer, | 
|---|
|  |  |  | name character varying(255), | 
|---|
|  |  |  | parentId integer, | 
|---|
|  |  |  | path character varying(255) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | as_message_channel bool default false, | 
|---|
|  |  |  | keepalive_interval_time integer, | 
|---|
|  |  |  | switch_primary_sub_stream bool default false, | 
|---|
|  |  |  | broadcast_push_after_ack bool default false, | 
|---|
|  |  |  | constraint uk_device_device unique (device_id) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | id serial primary key , | 
|---|
|  |  |  | channel_id character varying(50) not null, | 
|---|
|  |  |  | name character varying(255), | 
|---|
|  |  |  | custom_name character varying(255), | 
|---|
|  |  |  | manufacture character varying(50), | 
|---|
|  |  |  | model character varying(50), | 
|---|
|  |  |  | owner character varying(50), | 
|---|
|  |  |  | 
|---|
|  |  |  | port integer, | 
|---|
|  |  |  | password character varying(255), | 
|---|
|  |  |  | ptz_type integer, | 
|---|
|  |  |  | custom_ptz_type integer, | 
|---|
|  |  |  | status bool default false, | 
|---|
|  |  |  | longitude double precision, | 
|---|
|  |  |  | custom_longitude double precision, | 
|---|
|  |  |  | latitude double precision, | 
|---|
|  |  |  | custom_latitude double precision, | 
|---|
|  |  |  | stream_id character varying(50), | 
|---|
|  |  |  | device_id character varying(50) not null, | 
|---|
|  |  |  | parental character varying(50), | 
|---|
|  |  |  | 
|---|
|  |  |  | update_time character varying(50) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | create table wvp_resources_tree ( | 
|---|
|  |  |  | id serial primary key , | 
|---|
|  |  |  | is_catalog bool default true, | 
|---|
|  |  |  | device_channel_id integer , | 
|---|
|  |  |  | gb_stream_id integer, | 
|---|
|  |  |  | name character varying(255), | 
|---|
|  |  |  | parentId integer, | 
|---|
|  |  |  | path character varying(255) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /*鍒濆鏁版嵁*/ | 
|---|
|  |  |  | 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'); | 
|---|