Skip to content

Commit

Permalink
Also delete stream_markers related to the deleted videos
Browse files Browse the repository at this point in the history
  • Loading branch information
aaricdev committed Dec 16, 2023
1 parent 8c24ee0 commit cdc13dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/database/videos.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func (q *Query) InsertVideo(v Video) error {

func (q *Query) DeleteVideo(id string) error {
tx := q.DB.MustBegin()
tx.MustExec("delete from stream_markers where video_id=$1", id)
tx.MustExec("delete from video_muted_segments where video_id=$1", id)
tx.MustExec("delete from videos where id = $1", id)
return tx.Commit()
Expand Down

0 comments on commit cdc13dc

Please sign in to comment.