移除 skin 的 OnDelete

This commit is contained in:
xmdhs 2023-09-04 15:59:46 +08:00
parent ac0e3506a3
commit cf49d29e5a
No known key found for this signature in database
GPG Key ID: E809D6D43DEFCC95

View File

@ -35,7 +35,7 @@ func (User) Fields() []ent.Field {
// Edges of the User. // Edges of the User.
func (User) Edges() []ent.Edge { func (User) Edges() []ent.Edge {
return []ent.Edge{ return []ent.Edge{
edge.From("created_skin", Skin.Type).Ref("created_user").Annotations(entsql.OnDelete(entsql.Cascade)), edge.From("created_skin", Skin.Type).Ref("created_user"),
edge.To("profile", UserProfile.Type).Unique().Annotations(entsql.OnDelete(entsql.Cascade)), edge.To("profile", UserProfile.Type).Unique().Annotations(entsql.OnDelete(entsql.Cascade)),
edge.To("token", UserToken.Type).Unique().Annotations(entsql.OnDelete(entsql.Cascade)), edge.To("token", UserToken.Type).Unique().Annotations(entsql.OnDelete(entsql.Cascade)),
edge.To("skin", Skin.Type).Unique(), edge.To("skin", Skin.Type).Unique(),