Skip to content

Commit

Permalink
external_event duration nonnegative check
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-super committed Oct 8, 2024
1 parent 03e84f5 commit 8f3a324
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ comment on column merlin.external_event.properties is e''
'Any properties or additional data associated with this version that a data originator may have wanted included.\n'
'This column is used primarily for documentation purposes, and has no associated functionality.';

create trigger check_external_event_duration_is_nonnegative_trigger
before insert or update on merlin.external_event
for each row
when (new.duration < '0')
execute function util_functions.raise_duration_is_negative();

create function merlin.check_event_times()
returns trigger
language plpgsql as $$
Expand Down

0 comments on commit 8f3a324

Please sign in to comment.