1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

models/user_mail: refactor EmailAddress

This commit is contained in:
Unknwon
2016-07-16 10:08:04 +08:00
parent a4ea3bd015
commit 52322ef624
3 changed files with 204 additions and 172 deletions

View File

@@ -51,7 +51,7 @@ func (m *migration) Migrate(x *xorm.Engine) error {
// The version table. Should have only one row with id==1
type Version struct {
Id int64
ID int64 `xorm:"pk autoincr"`
Version int64
}
@@ -76,7 +76,7 @@ func Migrate(x *xorm.Engine) error {
return fmt.Errorf("sync: %v", err)
}
currentVersion := &Version{Id: 1}
currentVersion := &Version{ID: 1}
has, err := x.Get(currentVersion)
if err != nil {
return fmt.Errorf("get: %v", err)