diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-10 15:20:48 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-10 15:20:48 +0800 |
commit | 7dcc3bc3d7469770fa020c1728b43522afca42d5 (patch) | |
tree | 8c08c77f52ebbc07601524e4c217fb2dddd84ace /models/migrations/migrations.go | |
parent | 145648a2334ea4583cb51f2e95df2df366b17416 (diff) | |
download | gitea-7dcc3bc3d7469770fa020c1728b43522afca42d5.tar.gz gitea-7dcc3bc3d7469770fa020c1728b43522afca42d5.zip |
use x.SQL instead of x.Sql
Diffstat (limited to 'models/migrations/migrations.go')
-rw-r--r-- | models/migrations/migrations.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 66e5d831e8..7b4c6ec53e 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -628,7 +628,7 @@ func convertDateToUnix(x *xorm.Engine) (err error) { offset := 0 for { beans := make([]*Bean, 0, 100) - if err = x.Sql(fmt.Sprintf("SELECT * FROM `%s` ORDER BY id ASC LIMIT 100 OFFSET %d", + if err = x.SQL(fmt.Sprintf("SELECT * FROM `%s` ORDER BY id ASC LIMIT 100 OFFSET %d", table.name, offset)).Find(&beans); err != nil { return fmt.Errorf("select beans [table: %s, offset: %d]: %v", table.name, offset, err) } |