Commit 64cd48a92b722153066befdc6bda2993fab5f001

Authored by 648540858
1 parent 01bc6c85

增加备用字段

sql/2.6.8升级2.6.9.sql
@@ -455,6 +455,23 @@ rename table stream_push to wvp_stream_push; @@ -455,6 +455,23 @@ rename table stream_push to wvp_stream_push;
455 rename table user to wvp_user; 455 rename table user to wvp_user;
456 rename table user_role to wvp_user_role; 456 rename table user_role to wvp_user_role;
457 457
  458 +alter table wvp_device add column broadcast_push_after_ack bool default false;
  459 +alter table wvp_device_channel add column custom_name varchar(255) null ;
  460 +alter table wvp_device_channel add column custom_longitude double null ;
  461 +alter table wvp_device_channel add column custom_latitude double null ;
  462 +alter table wvp_device_channel add column custom_ptz_type int null ;
  463 +
  464 +create table wvp_resources_tree (
  465 + id serial primary key ,
  466 + is_catalog bool default true,
  467 + device_channel_id integer ,
  468 + gb_stream_id integer,
  469 + name character varying(255),
  470 + parentId integer,
  471 + path character varying(255)
  472 +);
  473 +
  474 +
458 475
459 476
460 477
sql/初始化.sql
@@ -32,6 +32,7 @@ create table wvp_device ( @@ -32,6 +32,7 @@ create table wvp_device (
32 as_message_channel bool default false, 32 as_message_channel bool default false,
33 keepalive_interval_time integer, 33 keepalive_interval_time integer,
34 switch_primary_sub_stream bool default false, 34 switch_primary_sub_stream bool default false,
  35 + broadcast_push_after_ack bool default false,
35 constraint uk_device_device unique (device_id) 36 constraint uk_device_device unique (device_id)
36 ); 37 );
37 38
@@ -53,6 +54,7 @@ create table wvp_device_channel ( @@ -53,6 +54,7 @@ create table wvp_device_channel (
53 id serial primary key , 54 id serial primary key ,
54 channel_id character varying(50) not null, 55 channel_id character varying(50) not null,
55 name character varying(255), 56 name character varying(255),
  57 + custom_name character varying(255),
56 manufacture character varying(50), 58 manufacture character varying(50),
57 model character varying(50), 59 model character varying(50),
58 owner character varying(50), 60 owner character varying(50),
@@ -71,9 +73,12 @@ create table wvp_device_channel ( @@ -71,9 +73,12 @@ create table wvp_device_channel (
71 port integer, 73 port integer,
72 password character varying(255), 74 password character varying(255),
73 ptz_type integer, 75 ptz_type integer,
  76 + custom_ptz_type integer,
74 status bool default false, 77 status bool default false,
75 longitude double precision, 78 longitude double precision,
  79 + custom_longitude double precision,
76 latitude double precision, 80 latitude double precision,
  81 + custom_latitude double precision,
77 stream_id character varying(50), 82 stream_id character varying(50),
78 device_id character varying(50) not null, 83 device_id character varying(50) not null,
79 parental character varying(50), 84 parental character varying(50),
@@ -279,6 +284,16 @@ create table wvp_user_role ( @@ -279,6 +284,16 @@ create table wvp_user_role (
279 update_time character varying(50) 284 update_time character varying(50)
280 ); 285 );
281 286
  287 +create table wvp_resources_tree (
  288 + id serial primary key ,
  289 + is_catalog bool default true,
  290 + device_channel_id integer ,
  291 + gb_stream_id integer,
  292 + name character varying(255),
  293 + parentId integer,
  294 + path character varying(255)
  295 +);
  296 +
282 /*初始数据*/ 297 /*初始数据*/
283 INSERT INTO wvp_user VALUES (1, 'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57','3e80d1762a324d5b0ff636e0bd16f1e3'); 298 INSERT INTO wvp_user VALUES (1, 'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021-04-13 14:14:57','2021-04-13 14:14:57','3e80d1762a324d5b0ff636e0bd16f1e3');
284 INSERT INTO wvp_user_role VALUES (1, 'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57'); 299 INSERT INTO wvp_user_role VALUES (1, 'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');