Files
lingniu-vehicle-ingest/vehicle-data-platform/deploy/migrations/051_customer_hydrogen_daily.sql
T
lingniu d6b957dfc8 feat: sync vehicle monitoring and accumulated platform updates
Add monitoring metrics, numeric sorting, report-time display, vehicle number labels, and map layout fixes. Include accumulated mileage, hydrogen, OneOS authentication, open platform, ingestion, deployment, and UI updates.

Exclude temporary files, generated reports, and credentials. Validate frontend 632 tests and production build, API packages, vehicle-map tests, and release installer tests. Gateway suite has one pre-existing date-sensitive identity throttling test failure reproduced on the parent commit.
2026-10-26 18:05:59 +08:00

20 lines
734 B
SQL

CREATE TABLE IF NOT EXISTS platform_customer_hydrogen_daily (
vin VARCHAR(32) NOT NULL,
stat_date DATE NOT NULL,
protocol VARCHAR(32) NOT NULL,
source_key VARCHAR(256) NOT NULL,
hydrogen_km DECIMAL(18,3) NOT NULL,
observed_km DECIMAL(18,3) NOT NULL,
classified_km DECIMAL(18,3) NOT NULL,
sample_count BIGINT NOT NULL,
known_sample_count BIGINT NOT NULL,
interval_count BIGINT NOT NULL,
rejected_intervals BIGINT NOT NULL,
first_event_time DATETIME(3) NOT NULL,
last_event_time DATETIME(3) NOT NULL,
algorithm_version VARCHAR(64) NOT NULL,
calculated_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY(vin,stat_date,protocol,source_key),
KEY idx_date(stat_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;