Bläddra i källkod

补充提交数据库脚本

xiaoguohua 2 månader sedan
förälder
incheckning
c8062cd3e0
2 ändrade filer med 14 tillägg och 44 borttagningar
  1. 1 1
      doc/数据库脚本/gateway-data.sql
  2. 13 43
      doc/数据库脚本/gateway.sql

+ 1 - 1
doc/数据库脚本/gateway-data.sql

@@ -2,7 +2,7 @@
 INSERT INTO config_transmit VALUES (1, 'TCP异步客户端', 'cn.oleauto.transmit.tcp.TcpClient', E'host=设备ip\r\nport=设备端口');
 INSERT INTO config_transmit VALUES (1, 'TCP异步客户端', 'cn.oleauto.transmit.tcp.TcpClient', E'host=设备ip\r\nport=设备端口');
 
 
 ---- 设备的协议
 ---- 设备的协议
-INSERT INTO config_protocol VALUES (1, 'IEC60870-104平衡', 'cn.oleauto.iec104.ProtocolImpl', E'cotFieldLength=cot信息字节数\r\ncommonAddressFieldLength=公共地址字节数\r\nioaFieldLength=测点编号字节数\r\ncommonAddress=公共地址\r\norginAddress=源地址');
+INSERT INTO config_protocol VALUES (1, 'IEC60870-104平衡', 'cn.oleauto.iec104.IEC104ProtocolImpl', E'cotFieldLength=cot信息字节数\r\ncommonAddressFieldLength=公共地址字节数\r\nioaFieldLength=测点编号字节数\r\ncommonAddress=公共地址\r\norginAddress=源地址');
 
 
 ---- 通信信道
 ---- 通信信道
 INSERT INTO config_channel VALUES (0, '000', 'mute 通道', '1', 1, '', 1, '', '', '2026-07-03 14:13:27', '2026-07-03 14:13:27', '', '');
 INSERT INTO config_channel VALUES (0, '000', 'mute 通道', '1', 1, '', 1, '', '', '2026-07-03 14:13:27', '2026-07-03 14:13:27', '', '');

+ 13 - 43
doc/数据库脚本/gateway.sql

@@ -263,49 +263,19 @@ ON COLUMN data_weather_local.wind_direction      IS '风向,北向为0,顺
 DROP TABLE IF EXISTS config_weather_local;
 DROP TABLE IF EXISTS config_weather_local;
 CREATE TABLE IF NOT EXISTS config_weather_local
 CREATE TABLE IF NOT EXISTS config_weather_local
 (
 (
-    id
-    BIGSERIAL
-    PRIMARY
-    KEY,
-    config_station_id
-    bigint
-    NOT
-    NULL,
-    horizontal_irradiance
-    json,
-    inclined_irradiance
-    json,
-    temperature
-    json,
-    pressure
-    json,
-    humidity
-    json,
-    wind_speed
-    json,
-    wind_direction
-    json,
-    create_time
-    timestamp
-    NOT
-    NULL
-    DEFAULT
-    CURRENT_TIMESTAMP,
-    update_time
-    timestamp
-    NOT
-    NULL
-    DEFAULT
-    CURRENT_TIMESTAMP,
-    create_by
-    varchar
-(
-    25
-) NOT NULL DEFAULT '',
-    update_by varchar
-(
-    25
-) NOT NULL DEFAULT ''
+    id BIGSERIAL PRIMARY KEY,
+    config_station_id bigint NOT NULL,
+    horizontal_irradiance json,
+    inclined_irradiance json,
+    temperature json,
+    pressure json,
+    humidity json,
+    wind_speed json,
+    wind_direction json,
+    create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    create_by varchar(25) NOT NULL DEFAULT '',
+    update_by varchar(25) NOT NULL DEFAULT ''
     );
     );
 COMMENT
 COMMENT
 ON TABLE config_weather_local IS '配置data_electricity_local中的电气量来源';
 ON TABLE config_weather_local IS '配置data_electricity_local中的电气量来源';