修复国标级联注册失败

This commit is contained in:
lin
2025-03-20 09:21:01 +08:00
parent ccafa0ea01
commit ec74488b4a
21 changed files with 166 additions and 57 deletions

View File

@@ -156,6 +156,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@@ -156,6 +156,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@@ -167,6 +167,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@@ -233,3 +233,32 @@ call wvp_20250312();
DROP PROCEDURE wvp_20250312;
/*
* 20250319
*/
CREATE PROCEDURE `wvp_20250319`()
BEGIN
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and column_name = 'gps_speed')
THEN
alter table wvp_device_channel add gps_speed double precision;
END IF;
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and column_name = 'gps_altitude')
THEN
alter table wvp_device_channel add gps_altitude double precision;
END IF;
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and column_name = 'gps_direction')
THEN
alter table wvp_device_channel add gps_direction double precision;
END IF;
END;
call wvp_20250319();
DROP PROCEDURE wvp_20250319;

View File

@@ -134,6 +134,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@@ -95,5 +95,11 @@ update wvp_media_server set server_id = '你的服务ID';
update wvp_stream_proxy set server_id = '你的服务ID';
update wvp_cloud_record set server_id = '你的服务ID';
/*
* 20250319
*/
alter table wvp_device_channel add column if not exists gps_speed double precision;
alter table wvp_device_channel add column if not exists gps_altitude double precision;
alter table wvp_device_channel add column if not exists gps_direction double precision;