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,7 +13,7 @@ type Game struct {
|
||||
|
||||
func (Game) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.UUID("id", uuid.New()).Unique().Immutable(),
|
||||
field.UUID("id", uuid.Nil).Unique().Immutable(),
|
||||
field.Text("name").MaxLen(64),
|
||||
field.Time("created").Immutable(),
|
||||
field.Text("author").MaxLen(64),
|
||||
|
||||
Reference in New Issue
Block a user