-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b133efa
commit e2dbb8d
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
deployment/hasura/migrations/Aerie/8_span_event_linkage/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- event table revert | ||
alter table merlin.event | ||
drop column span_index; | ||
|
||
-- span table revert | ||
alter table merlin.span | ||
drop constraint dataset_span_index_unique; | ||
|
||
alter table merlin.span | ||
drop column span_index; | ||
|
15 changes: 15 additions & 0 deletions
15
deployment/hasura/migrations/Aerie/8_span_event_linkage/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- Span Table update | ||
alter table merlin.span | ||
add column span_index integer; | ||
|
||
update merlin.span | ||
set span_index = id; | ||
|
||
alter table merlin.span | ||
alter column span_index set not null, | ||
add constraint dataset_span_index_unique | ||
unique (dataset_id, span_index); | ||
|
||
-- event table update | ||
alter table merlin.event | ||
add column span_index integer not null; |