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,15 @@
create or replace function ems.fn_economics_unlock_day(p_site_id int, p_day date)
returns jsonb
language plpgsql
as $fn$
begin
delete from ems.audit_day_lock
where site_id = p_site_id
and day_local = p_day;
return jsonb_build_object('locked', false, 'day', p_day);
end;
$fn$;
comment on function ems.fn_economics_unlock_day(int, date) is
'Odebere zámek dne ekonomiky (DELETE lock).';