sql first refactor
Some checks failed
CI and deploy / migration-check (push) Successful in 5s
CI and deploy / deploy (push) Failing after 20s

This commit is contained in:
Dusan Vojacek
2026-04-19 20:02:20 +02:00
parent a02e11ee13
commit 93f883f5e0
74 changed files with 6022 additions and 4014 deletions

View File

@@ -0,0 +1,21 @@
create or replace function ems.fn_deye_tou_inactive_signature(
p_hhmm_inactive int,
p_min_soc_pct numeric,
p_reserve_soc_pct numeric,
p_tp_discharge_w int
)
returns text
language sql
immutable
as $fn$
select concat_ws(
'|',
p_hhmm_inactive::text,
round(p_min_soc_pct, 2)::text,
round(p_reserve_soc_pct, 2)::text,
p_tp_discharge_w::text
);
$fn$;
comment on function ems.fn_deye_tou_inactive_signature(int, numeric, numeric, int) is
'Podpis neaktivních TOU slotů (shoda s asset_inverter.deye_tou_inactive_signature).';