1
0
mirror of https://github.com/beego/bee.git synced 2025-06-11 18:40:40 +00:00

Merge pull request from filiphaftek/master

Fix incorrect generation of postgres table id type
This commit is contained in:
astaxie
2016-09-18 09:07:37 +08:00
committed by GitHub

@ -129,7 +129,7 @@ func (m postgresqlDriver) generateSQLFromFields(fields string) string {
return ""
}
if i == 0 && strings.ToLower(kv[0]) != "id" {
sql += "id interger serial primary key,"
sql += "id serial primary key,"
}
sql += snakeString(kv[0]) + " " + typ + ","
if tag != "" {