Use uuid.Nil instead of uuid.New() in ent schema initializers
It is used just to carry the sql.Scanner and sql.Valuer interface.
This commit is contained in:
@@ -13,14 +13,13 @@ type Answer struct {
|
||||
|
||||
func (Answer) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.UUID("id", uuid.New()).Immutable().Unique(),
|
||||
field.UUID("id", uuid.Nil).Immutable().Unique(),
|
||||
field.Time("answered").Immutable(),
|
||||
}
|
||||
}
|
||||
|
||||
func (Answer) Indexes() []ent.Index {
|
||||
return []ent.Index{
|
||||
}
|
||||
return []ent.Index{}
|
||||
}
|
||||
|
||||
func (Answer) Edges() []ent.Edge {
|
||||
|
||||
Reference in New Issue
Block a user