fanybook
|
aea91cc7de
|
add table & column comment for postgres(add table comment for mysql) (#2067)
让 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: https://gitea.com/xorm/xorm/pulls/2067
Co-authored-by: fanybook <fanybook@noreply.gitea.io>
Co-committed-by: fanybook <fanybook@noreply.gitea.io>
|
2021-11-12 20:58:05 +08:00 |
Lunny Xiao
|
ce2a743e88
|
Fix comments (#1896)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1896
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
|
2021-04-12 16:00:07 +08:00 |
Lunny Xiao
|
6485adb722
|
Fix table name (#1590)
add test
Fix table name
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1590
|
2020-03-10 08:15:13 +00:00 |
Lunny Xiao
|
bf25a77bca
|
Merge core package back into the main repository and split into serval sub packages. (#1543)
Fix test
Improve fmt
update go.mod
Move core as a sub package
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1543
|
2020-02-24 08:53:18 +00:00 |