Skip to content

Commit

Permalink
fix(playlist): cascade delete multistream info
Browse files Browse the repository at this point in the history
  • Loading branch information
Zibbp committed Nov 11, 2024
1 parent 8980224 commit 694b73b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ent/schema/playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"time"

"entgo.io/ent"
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
Expand All @@ -30,6 +31,6 @@ func (Playlist) Fields() []ent.Field {
func (Playlist) Edges() []ent.Edge {
return []ent.Edge{
edge.To("vods", Vod.Type),
edge.To("multistream_info", MultistreamInfo.Type),
edge.To("multistream_info", MultistreamInfo.Type).Annotations(entsql.OnDelete(entsql.Cascade)),
}
}

0 comments on commit 694b73b

Please sign in to comment.