GORM Playground Link
https://github.com/go-gorm/playground/pull/1
Description
默认生成的结构体,注释在字段的后面,以//字段名,这样的话,我们使用autoMigrate生成的数据表,就不会有comment,反向再生成的时候,就会丢失comment
建议在tbl_column文件的buildGormTag方法中,加一个
if c, ok := c.Comment(); ok {
if c != "" {
buf.WriteString(fmt.Sprintf(";comment:%s", c))
}
}
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: li-jin-gou
you can make a pull request in https://github.com/go-gorm/gen