Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-29 21:26:10 +01:00

Fix missed table name on iterate lfs meta objects (#24768) (#24774)

Backport #24768 by @lunny

Fix #24763

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot 2023-05-17 14:35:20 -04:00 committed by GitHub
parent 57f520e7e5
commit 1bad05da3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,7 +390,7 @@ func IterateLFSMetaObjectsForRepo(ctx context.Context, repoID int64, f func(cont
for {
beans := make([]*CountLFSMetaObject, 0, batchSize)
sess := engine.Select("`lfs_meta_object`.*, COUNT(`l1`.oid) AS `count`").
sess := engine.Table("lfs_meta_object").Select("`lfs_meta_object`.*, COUNT(`l1`.oid) AS `count`").
Join("INNER", "`lfs_meta_object` AS l1", "`lfs_meta_object`.oid = `l1`.oid").
Where("`lfs_meta_object`.repository_id = ?", repoID)
if !opts.OlderThan.IsZero() {