Skip to content

Commit

Permalink
remove unnecessary "create or replace"
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-super committed Oct 3, 2024
1 parent 412e2fd commit fdffc4b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions deployment/hasura/migrations/Aerie/11_external_events/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ comment on column merlin.created_at is e''
'The time (in _planner_ time, NOT _plan_ time) that this link was created at.'

-- Add a trigger verifying that events fit into their sources
create or replace function merlin.check_event_times()
create function merlin.check_event_times()
returns trigger
language plpgsql as
$func$
Expand Down Expand Up @@ -254,7 +254,7 @@ comment on function merlin.subtract_later_ranges(curr_date tstzmultirange, later
'and another valid at t=2 with a span 3 to 4, then this source should have those spans subtracted and should only be valid over [1,2] and [4,5].';

-- create a view that derives events from different sources in a given derivation group
create or replace view merlin.derived_events
create view merlin.derived_events
as
select
-- from the events adhering to rules 1-3, filter by overlapping names such that only the most recent and valid event is included (row_number = 1; fitting rule 4)
Expand Down Expand Up @@ -327,7 +327,7 @@ comment on view merlin.derived_events is e''
'A view detailing all derived events from all derivation groups.';

-- create a view that aggregates additional derivation group information
create or replace view merlin.derivation_group_comp
create view merlin.derivation_group_comp
as
select
name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- Create a function to subtract lists of time ranges
create or replace function merlin.subtract_later_ranges(curr_date tstzmultirange, later_dates tstzmultirange[])
create function merlin.subtract_later_ranges(curr_date tstzmultirange, later_dates tstzmultirange[])
returns tstzmultirange
immutable
language plpgsql as $$
declare
ret tstzmultirange := curr_date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ comment on column merlin.external_event.properties is e''
'This column is used primarily for documentation purposes, and has no associated functionality.';

-- Add a trigger verifying that events fit into their sources
create or replace function merlin.check_event_times()
create function merlin.check_event_times()
returns trigger
language plpgsql as
$func$
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- create a view that derives events from different sources in a given derivation group
create or replace view merlin.derived_events
create view merlin.derived_events
as
select
-- from the events adhering to rules 1-3, filter by overlapping names such that only the most recent and valid event is included (row_number = 1; fitting rule 4)
Expand Down

0 comments on commit fdffc4b

Please sign in to comment.