fix repeatable migrations

This commit is contained in:
Dusan Vojacek
2026-04-19 20:15:46 +02:00
parent 0c93f493a4
commit 22bca9cd9e
73 changed files with 22 additions and 15 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).';