gormt icon indicating copy to clipboard operation
gormt copied to clipboard

database to golang struct

Results 61 gormt issues
Sort by recently updated
recently updated
newest added

gorm 1.x 使用 primaryKey 好像识别不出来.. 现在的版本默认都是生成的 primaryKey , AUTO_INCREMENT 不加上, 新增的时候主键id不会被复制好像.

func (m *VOffer) TableName() string { return "my_db.v_offer" } 如同上面所示。希望可以加上“my_db.”

func (obj *_VGameOrderItemMgr) GetBatchFromResult(results []bool) (results []*VGameOrderItem, err error) input跟output參數名都叫results導致golang無法編譯

1.DDL 设置一个非空的字符串值作为默认值, 2.使用gormt生成的结构, 3.再去AutoMigrate建表时会出现SQL错误,原因是丢掉了default值的引号 另外: 建议SQL 每个字段的注释还是要放在gorm中,否则Migrate table的时候会丢掉注释,无法原样的重复数据库DDL,集中式DB的项目这样可能无问题,但是多版本发布的情况下,应用程序自动建库建表,就不太合适。

hi,Warning using golint,Can we follow this(golint) standard ? thanks ![image](https://user-images.githubusercontent.com/76477612/112719675-02538a00-8f35-11eb-9a36-8fc7a5157e8c.png)

panic: type (set('j','p','b','s','a','f','c','h'))

Hi @xxjwxc, Hope you are all well ! I exported the following database with gormt but when I want to automigrate structs with gorm it triggers errors related to indexes....

![image](https://user-images.githubusercontent.com/16432902/104118023-c90d7400-5360-11eb-8d39-0161d4f2f0a6.png)