mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
dialect/sql/schema: allow setting table comments (#3365)
This commit is contained in:
@@ -612,7 +612,8 @@ func (g *Graph) edgeSchemas() error {
|
||||
func (g *Graph) Tables() (all []*schema.Table, err error) {
|
||||
tables := make(map[string]*schema.Table)
|
||||
for _, n := range g.Nodes {
|
||||
table := schema.NewTable(n.Table())
|
||||
table := schema.NewTable(n.Table()).
|
||||
SetComment(n.sqlComment())
|
||||
if n.HasOneFieldID() {
|
||||
table.AddPrimary(n.ID.PK())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user