implementace Ekonomiky
This commit is contained in:
18
db/migration/V036__pv_array_telemetry_source.sql
Normal file
18
db/migration/V036__pv_array_telemetry_source.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- =============================================================
|
||||
-- V036 – asset_pv_array.telemetry_source
|
||||
-- Explicitní mapování FVE pole → sloupec v telemetry_inverter.
|
||||
-- =============================================================
|
||||
|
||||
ALTER TABLE ems.asset_pv_array
|
||||
ADD COLUMN IF NOT EXISTS telemetry_source TEXT;
|
||||
|
||||
COMMENT ON COLUMN ems.asset_pv_array.telemetry_source IS
|
||||
'Který sloupec v telemetry_inverter odpovídá tomuto poli.
|
||||
gen_port = gen_port_power_w (AC-coupled pole na GEN portu),
|
||||
pv_strings = pv1_power_w + pv2_power_w (DC stringy na MPPT),
|
||||
pv_total = pv_power_w (souhrnné, pokud pole nelze rozlišit).
|
||||
NULL = pole nemá přímou telemetrii (fallback na forecast).';
|
||||
|
||||
-- Seed pro referenční site home-01:
|
||||
UPDATE ems.asset_pv_array SET telemetry_source = 'pv_strings' WHERE code = 'pv-a';
|
||||
UPDATE ems.asset_pv_array SET telemetry_source = 'gen_port' WHERE code = 'pv-b';
|
||||
Reference in New Issue
Block a user