yeg
2026-09-05 890049eeece6fc94cd974368451cdc36ec89fdf4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- 开发库全量清理:保留电池组、电池号、共享字段和测试类型
-- 执行前请先停止 Spring Boot 后端和模拟器
 
SET FOREIGN_KEY_CHECKS = 0;
 
TRUNCATE TABLE t_test_sample_measurement;
TRUNCATE TABLE t_test_sample;
TRUNCATE TABLE t_test_collector_sample;
TRUNCATE TABLE t_channel_snapshot;
TRUNCATE TABLE t_device_run_event;
TRUNCATE TABLE t_test_exception;
TRUNCATE TABLE t_protocol_message;
# TRUNCATE TABLE t_test_result;
# TRUNCATE TABLE t_test_field_snapshot;
# TRUNCATE TABLE t_test_collector_channel;
TRUNCATE TABLE t_test_battery_field;
TRUNCATE TABLE t_test_channel_binding;
TRUNCATE TABLE t_test_battery;
TRUNCATE TABLE t_test_plan_step;
TRUNCATE TABLE t_test_warning_threshold;
TRUNCATE TABLE t_test_audit;
TRUNCATE TABLE t_test;
 
TRUNCATE TABLE t_detection_channel;
TRUNCATE TABLE t_detection_cabinet;
TRUNCATE TABLE t_collector;
TRUNCATE TABLE t_device_adapter;
 
SET FOREIGN_KEY_CHECKS = 1;