entc/gen: use default name in column construction

Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/41

Reviewed By: alexsn

Differential Revision: D17599004

fbshipit-source-id: 928d82fe689ca1c528ec204c3fb6e2732cb58f0b
This commit is contained in:
Ariel Mashraki
2019-09-26 05:58:00 -07:00
committed by Facebook Github Bot
parent dacc568413
commit bd6d7cc647

View File

@@ -474,7 +474,7 @@ func (f Field) Column() *schema.Column {
}
}
if f.Default && !f.IsTime() {
c.Default = "Default" + pascal(f.Name)
c.Default = f.DefaultName()
}
return c
}