更新-postgresql-kingbase-2.6.9.sql 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. alter table device
  2. change deviceId device_id varchar(50) not null;
  3. alter table device
  4. change streamMode stream_mode varchar(50) null;
  5. alter table device
  6. change registerTime register_time varchar(50) null;
  7. alter table device
  8. change keepaliveTime keepalive_time varchar(50) null;
  9. alter table device
  10. change createTime create_time varchar(50) not null;
  11. alter table device
  12. change updateTime update_time varchar(50) not null;
  13. alter table device
  14. change subscribeCycleForCatalog subscribe_cycle_for_catalog bool default false;
  15. alter table device
  16. change subscribeCycleForMobilePosition subscribe_cycle_for_mobile_position bool default false;
  17. alter table device
  18. change mobilePositionSubmissionInterval mobile_position_submission_interval int default 5 not null;
  19. alter table device
  20. change subscribeCycleForAlarm subscribe_cycle_for_alarm bool default false;
  21. alter table device
  22. change hostAddress host_address varchar(50) null;
  23. alter table device
  24. change ssrcCheck ssrc_check bool default false;
  25. alter table device
  26. change geoCoordSys geo_coord_sys varchar(50) not null;
  27. alter table device
  28. drop column treeType;
  29. alter table device
  30. change mediaServerId media_server_id varchar(50) default 'auto' null;
  31. alter table device
  32. change sdpIp sdp_ip varchar(50) null;
  33. alter table device
  34. change localIp local_ip varchar(50) null;
  35. alter table device
  36. change asMessageChannel as_message_channel bool default false;
  37. alter table device
  38. change keepaliveIntervalTime keepalive_interval_time int null;
  39. alter table device
  40. change online on_line varchar(50) null;
  41. alter table device
  42. add COLUMN switch_primary_sub_stream bool default false comment '开启主子码流切换的开关(0-不开启,1-开启)现在已知支持设备为 大华、TP——LINK全系设备'
  43. alter table device_alarm
  44. change deviceId device_id varchar(50) not null;
  45. alter table device_alarm
  46. change channelId channel_id varchar(50) not null;
  47. alter table device_alarm
  48. change alarmPriority alarm_priority varchar(50) not null;
  49. alter table device_alarm
  50. change alarmMethod alarm_method varchar(50) null;
  51. alter table device_alarm
  52. change alarmTime alarm_time varchar(50) not null;
  53. alter table device_alarm
  54. change alarmDescription alarm_description varchar(255) null;
  55. alter table device_alarm
  56. change alarmType alarm_type varchar(50) null;
  57. alter table device_alarm
  58. change createTime create_time varchar(50) null;
  59. alter table device_channel
  60. change channelId channel_id varchar(50) not null;
  61. alter table device_channel
  62. change civilCode civil_code varchar(50) null;
  63. alter table device_channel
  64. change parentId parent_id varchar(50) null;
  65. alter table device_channel
  66. change safetyWay safety_way int null;
  67. alter table device_channel
  68. change registerWay register_way int null;
  69. alter table device_channel
  70. change certNum cert_num varchar(50) null;
  71. alter table device_channel
  72. change errCode err_code int null;
  73. alter table device_channel
  74. change endTime end_time varchar(50) null;
  75. alter table device_channel
  76. change ipAddress ip_address varchar(50) null;
  77. alter table device_channel
  78. change PTZType ptz_type int null;
  79. alter table device_channel
  80. change status status bool default false;
  81. alter table device_channel
  82. change streamId stream_id varchar(255) null;
  83. alter table device_channel
  84. change deviceId device_id varchar(50) not null;
  85. alter table device_channel
  86. change hasAudio has_audio bool default false;
  87. alter table device_channel
  88. change createTime create_time varchar(50) not null;
  89. alter table device_channel
  90. change updateTime update_time varchar(50) not null;
  91. alter table device_channel
  92. change subCount sub_count int default 0 null;
  93. alter table device_channel
  94. change longitudeGcj02 longitude_gcj02 double null;
  95. alter table device_channel
  96. change latitudeGcj02 latitude_gcj02 double null;
  97. alter table device_channel
  98. change longitudeWgs84 longitude_wgs84 double null;
  99. alter table device_channel
  100. change latitudeWgs84 latitude_wgs84 double null;
  101. alter table device_channel
  102. change businessGroupId business_group_id varchar(50) null;
  103. alter table device_channel
  104. change gpsTime gps_time varchar(50) null;
  105. alter table device_mobile_position
  106. change deviceId device_id varchar(50) not null;
  107. alter table device_mobile_position
  108. change channelId channel_id varchar(50) not null;
  109. alter table device_mobile_position
  110. change deviceName device_name varchar(255) null;
  111. alter table device_mobile_position
  112. change reportSource report_source varchar(50) null;
  113. alter table device_mobile_position
  114. change longitudeGcj02 longitude_gcj02 double null;
  115. alter table device_mobile_position
  116. change latitudeGcj02 latitude_gcj02 double null;
  117. alter table device_mobile_position
  118. change longitudeWgs84 longitude_wgs84 double null;
  119. alter table device_mobile_position
  120. change latitudeWgs84 latitude_wgs84 double null;
  121. alter table device_mobile_position
  122. change createTime create_time varchar(50) null;
  123. alter table gb_stream
  124. change gbStreamId gb_stream_id int auto_increment;
  125. alter table gb_stream
  126. change gbId gb_id varchar(50) not null;
  127. alter table gb_stream
  128. change streamType stream_type varchar(50) null;
  129. alter table gb_stream
  130. change mediaServerId media_server_id varchar(50) null;
  131. alter table gb_stream
  132. change createTime create_time varchar(50) null;
  133. alter table log
  134. change createTime create_time varchar(50) not null;
  135. alter table media_server
  136. change hookIp hook_ip varchar(50) not null;
  137. alter table media_server
  138. add column send_rtp_port_range varchar(50) default null;
  139. alter table media_server
  140. change sdpIp sdp_ip varchar(50) not null;
  141. alter table media_server
  142. change streamIp stream_ip varchar(50) not null;
  143. alter table media_server
  144. change httpPort http_port int not null;
  145. alter table media_server
  146. change httpSSlPort http_ssl_port int not null;
  147. alter table media_server
  148. change rtmpPort rtmp_port int not null;
  149. alter table media_server
  150. change rtmpSSlPort rtmp_ssl_port int not null;
  151. alter table media_server
  152. change rtpProxyPort rtp_proxy_port int not null;
  153. alter table media_server
  154. change rtspPort rtsp_port int not null;
  155. alter table media_server
  156. change rtspSSLPort rtsp_ssl_port int not null;
  157. alter table media_server
  158. change autoConfig auto_config bool default true;
  159. alter table media_server
  160. change rtpEnable rtp_enable bool default false;
  161. alter table media_server
  162. change rtpPortRange rtp_port_range varchar(50) not null;
  163. alter table media_server
  164. change recordAssistPort record_assist_port int not null;
  165. alter table media_server
  166. change defaultServer default_server bool default false;
  167. alter table media_server
  168. change createTime create_time varchar(50) not null;
  169. alter table media_server
  170. change updateTime update_time varchar(50) not null;
  171. alter table media_server
  172. change hookAliveInterval hook_alive_interval int not null;
  173. alter table parent_platform
  174. change serverGBId server_gb_id varchar(50) not null;
  175. alter table parent_platform
  176. change serverGBDomain server_gb_domain varchar(50) null;
  177. alter table parent_platform
  178. change serverIP server_ip varchar(50) null;
  179. alter table parent_platform
  180. change serverPort server_port int null;
  181. alter table parent_platform
  182. change deviceGBId device_gb_id varchar(50) not null;
  183. alter table parent_platform
  184. change deviceIp device_ip varchar(50) null;
  185. alter table parent_platform
  186. change devicePort device_port varchar(50) null;
  187. alter table parent_platform
  188. change keepTimeout keep_timeout varchar(50) null;
  189. alter table parent_platform
  190. change characterSet character_set varchar(50) null;
  191. alter table parent_platform
  192. change catalogId catalog_id varchar(50) not null;
  193. alter table parent_platform
  194. change startOfflinePush start_offline_push bool default false;
  195. alter table parent_platform
  196. change administrativeDivision administrative_division varchar(50) not null;
  197. alter table parent_platform
  198. change catalogGroup catalog_group int default 1 null;
  199. alter table parent_platform
  200. change createTime create_time varchar(50) null;
  201. alter table parent_platform
  202. change updateTime update_time varchar(50) null;
  203. alter table parent_platform
  204. drop column treeType;
  205. alter table parent_platform
  206. change asMessageChannel as_message_channel bool default false;
  207. alter table parent_platform
  208. change enable enable bool default false;
  209. alter table parent_platform
  210. change ptz ptz bool default false;
  211. alter table parent_platform
  212. change rtcp rtcp bool default false;
  213. alter table parent_platform
  214. change status status bool default false;
  215. alter table parent_platform
  216. change status status bool default false;
  217. alter table platform_catalog
  218. change platformId platform_id varchar(50) not null;
  219. alter table platform_catalog
  220. change parentId parent_id varchar(50) null;
  221. alter table platform_catalog
  222. change civilCode civil_code varchar(50) null;
  223. alter table platform_catalog
  224. change businessGroupId business_group_id varchar(50) null;
  225. alter table platform_gb_channel
  226. change platformId platform_id varchar(50) not null;
  227. alter table platform_gb_channel
  228. change catalogId catalog_id varchar(50) not null;
  229. alter table platform_gb_channel
  230. change deviceChannelId device_channel_id int not null;
  231. alter table platform_gb_stream
  232. change platformId platform_id varchar(50) not null;
  233. alter table platform_gb_stream
  234. change catalogId catalog_id varchar(50) not null;
  235. alter table platform_gb_stream
  236. change gbStreamId gb_stream_id int not null;
  237. alter table stream_proxy
  238. change mediaServerId media_server_id varchar(50) null;
  239. alter table stream_proxy
  240. change createTime create_time varchar(50) not null;
  241. alter table stream_proxy
  242. change updateTime update_time varchar(50) null;
  243. alter table stream_proxy
  244. change enable_remove_none_reader enable_remove_none_reader bool default false;
  245. alter table stream_proxy
  246. change enable_disable_none_reader enable_disable_none_reader bool default false;
  247. alter table stream_proxy
  248. change enable_audio enable_audio bool default false;
  249. alter table stream_proxy
  250. change enable_mp4 enable_mp4 bool default false;
  251. alter table stream_proxy
  252. change enable enable bool default false;
  253. alter table stream_push
  254. change totalReaderCount total_reader_count varchar(50) null;
  255. alter table stream_push
  256. change originType origin_type int null;
  257. alter table stream_push
  258. change originTypeStr origin_type_str varchar(50) null;
  259. alter table stream_push
  260. change createTime create_time varchar(50) null;
  261. alter table stream_push
  262. change aliveSecond alive_second int null;
  263. alter table stream_push
  264. change mediaServerId media_server_id varchar(50) null;
  265. alter table stream_push
  266. change status status bool default false;
  267. alter table stream_push
  268. change pushTime push_time varchar(50) null;
  269. alter table stream_push
  270. change updateTime update_time varchar(50) null;
  271. alter table stream_push
  272. change pushIng push_ing bool default false;
  273. alter table stream_push
  274. change status status bool default false;
  275. alter table stream_push
  276. change self self bool default false;
  277. alter table stream_push
  278. drop column serverId;
  279. alter table user
  280. change roleId role_id int not null;
  281. alter table user
  282. change createTime create_time varchar(50) not null;
  283. alter table user
  284. change updateTime update_time varchar(50) not null;
  285. alter table user
  286. change pushKey push_key varchar(50) null;
  287. alter table user_role
  288. change createTime create_time varchar(50) not null;
  289. alter table user_role
  290. change updateTime update_time varchar(50) not null;
  291. rename table device to wvp_device;
  292. rename table device_alarm to wvp_device_alarm;
  293. rename table device_channel to wvp_device_channel;
  294. rename table device_mobile_position to wvp_device_mobile_position;
  295. rename table gb_stream to wvp_gb_stream;
  296. rename table log to wvp_log;
  297. rename table media_server to wvp_media_server;
  298. rename table parent_platform to wvp_platform;
  299. rename table platform_catalog to wvp_platform_catalog;
  300. rename table platform_gb_channel to wvp_platform_channel;
  301. rename table platform_gb_stream to wvp_platform_gb_stream;
  302. rename table stream_proxy to wvp_stream_proxy;
  303. rename table stream_push to wvp_stream_push;
  304. rename table user to wvp_user;
  305. rename table user_role to wvp_user_role;
  306. alter table wvp_device add column broadcast_push_after_ack bool default false;
  307. alter table wvp_device_channel add column custom_name varchar(255) null ;
  308. alter table wvp_device_channel add column custom_longitude double null ;
  309. alter table wvp_device_channel add column custom_latitude double null ;
  310. alter table wvp_device_channel add column custom_ptz_type int null ;
  311. create table wvp_resources_tree (
  312. id serial primary key ,
  313. is_catalog bool default true,
  314. device_channel_id integer ,
  315. gb_stream_id integer,
  316. name character varying(255),
  317. parentId integer,
  318. path character varying(255)
  319. );
  320. alter table wvp_platform
  321. add auto_push_channel bool default false;
  322. alter table wvp_stream_proxy
  323. add stream_key character varying(255);
  324. create table wvp_cloud_record (
  325. id serial primary key,
  326. app character varying(255),
  327. stream character varying(255),
  328. call_id character varying(255),
  329. start_time int8,
  330. end_time int8,
  331. media_server_id character varying(50),
  332. file_name character varying(255),
  333. folder character varying(255),
  334. file_path character varying(255),
  335. collect bool default false,
  336. file_size int8,
  337. time_len int8,
  338. constraint uk_stream_push_app_stream_path unique (app, stream, file_path)
  339. );
  340. alter table wvp_media_server
  341. add record_path character varying(255);
  342. alter table wvp_media_server
  343. add record_day integer default 7;
  344. alter table wvp_stream_push
  345. add server_id character varying(50);