Files
ent/entc/integration/migrate/entv1/schema/user.go
Ariel Mashraki fd738c1b3e add case for column deletion
Reviewed By: alexsn

Differential Revision: D16183212

fbshipit-source-id: af288f2e1433820356e97ede77c7595db8d23a9f
2019-07-10 10:21:41 -07:00

21 lines
326 B
Go

package schema
import (
"fbc/ent"
"fbc/ent/field"
)
// User holds the schema definition for the User entity.
type User struct {
ent.Schema
}
// Fields of the User.
func (User) Fields() []ent.Field {
return []ent.Field{
field.Int32("age"),
field.String("name").MaxLen(10),
field.String("address").Optional(),
}
}