aea91cc7de
让 postgres 支持字段注释,只在 v1.2.5 上测试过(不知道怎么 import master) 发现 master 分支好像大改了?模式表名带 schema 了 使用方式和 mysql 相同 ```go type User struct { Id int64 `xorm:"pk autoincr"` Name string `json:"name" xorm:"not null default '' varchar(50) index(name_age) comment('用户 (it''s) 1; 名')"` Salt string Age int `json:"age" xorm:"not null default 0 int(10) index(name_age) comment('年龄')"` Passwd string `xorm:"varchar(200)"` CreatedAt time.Time `xorm:"created"` UpdatedAt time.Time `xorm:"updated"` } _ = engine.Sync(new(User)) func (model User) TableComment() string { return "表注释" } ``` Co-authored-by: fanybook <fanybook@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: xorm/xorm#2067 Co-authored-by: fanybook <fanybook@noreply.gitea.io> Co-committed-by: fanybook <fanybook@noreply.gitea.io> |
||
---|---|---|
.. | ||
mapper_test.go | ||
mapper.go | ||
table_name_test.go | ||
table_name.go |