This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relate recordings to backends w/o mediation of streams (#150)
- Loading branch information
1 parent
b24105a
commit dba75e2
Showing
13 changed files
with
208 additions
and
97 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
migrations/2020-09-11-163557_move_backend_id_from_stream_to_recording/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,6 @@ | ||
DROP INDEX recording_rtc_id_idx; | ||
|
||
ALTER TABLE janus_rtc_stream | ||
DROP CONSTRAINT janus_rtc_stream_backend_id_fkey; | ||
|
||
ALTER TABLE recording DROP COLUMN backend_id; |
16 changes: 16 additions & 0 deletions
16
migrations/2020-09-11-163557_move_backend_id_from_stream_to_recording/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,16 @@ | ||
ALTER TABLE recording ADD COLUMN backend_id agent_id NULL; | ||
UPDATE recording SET backend_id = '("(janus,svc.netology-group.services)",unknown)'::agent_id; | ||
ALTER TABLE recording ALTER COLUMN backend_id SET NOT NULL; | ||
|
||
UPDATE recording AS rec | ||
SET backend_id = jrs.backend_id | ||
FROM janus_rtc_stream AS jrs | ||
WHERE jrs.rtc_id = rec.rtc_id; | ||
|
||
ALTER TABLE janus_rtc_stream | ||
ADD CONSTRAINT janus_rtc_stream_backend_id_fkey | ||
FOREIGN KEY (backend_id) | ||
REFERENCES janus_backend(id) | ||
ON DELETE CASCADE; | ||
|
||
CREATE UNIQUE INDEX recording_rtc_id_idx ON recording (rtc_id); |
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
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
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
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
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
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
Oops, something went wrong.