fix repeatable migrations
This commit is contained in:
15
db/routines/R__010_fn_economics_unlock_day.sql
Normal file
15
db/routines/R__010_fn_economics_unlock_day.sql
Normal 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).';
|
||||
Reference in New Issue
Block a user