@@ -83,43 +83,43 @@ var CmdMigrateStorage = cli.Command{
8383}
8484
8585func migrateAttachments (ctx context.Context , dstStorage storage.ObjectStorage ) error {
86- return db .IterateObjects (ctx , func (attach * repo_model.Attachment ) error {
86+ return db .Iterate (ctx , nil , func (ctx context. Context , attach * repo_model.Attachment ) error {
8787 _ , err := storage .Copy (dstStorage , attach .RelativePath (), storage .Attachments , attach .RelativePath ())
8888 return err
8989 })
9090}
9191
9292func migrateLFS (ctx context.Context , dstStorage storage.ObjectStorage ) error {
93- return db .IterateObjects (ctx , func (mo * git_model.LFSMetaObject ) error {
93+ return db .Iterate (ctx , nil , func (ctx context. Context , mo * git_model.LFSMetaObject ) error {
9494 _ , err := storage .Copy (dstStorage , mo .RelativePath (), storage .LFS , mo .RelativePath ())
9595 return err
9696 })
9797}
9898
9999func migrateAvatars (ctx context.Context , dstStorage storage.ObjectStorage ) error {
100- return db .IterateObjects (ctx , func (user * user_model.User ) error {
100+ return db .Iterate (ctx , nil , func (ctx context. Context , user * user_model.User ) error {
101101 _ , err := storage .Copy (dstStorage , user .CustomAvatarRelativePath (), storage .Avatars , user .CustomAvatarRelativePath ())
102102 return err
103103 })
104104}
105105
106106func migrateRepoAvatars (ctx context.Context , dstStorage storage.ObjectStorage ) error {
107- return db .IterateObjects (ctx , func (repo * repo_model.Repository ) error {
107+ return db .Iterate (ctx , nil , func (ctx context. Context , repo * repo_model.Repository ) error {
108108 _ , err := storage .Copy (dstStorage , repo .CustomAvatarRelativePath (), storage .RepoAvatars , repo .CustomAvatarRelativePath ())
109109 return err
110110 })
111111}
112112
113113func migrateRepoArchivers (ctx context.Context , dstStorage storage.ObjectStorage ) error {
114- return db .IterateObjects (ctx , func (archiver * repo_model.RepoArchiver ) error {
114+ return db .Iterate (ctx , nil , func (ctx context. Context , archiver * repo_model.RepoArchiver ) error {
115115 p := archiver .RelativePath ()
116116 _ , err := storage .Copy (dstStorage , p , storage .RepoArchives , p )
117117 return err
118118 })
119119}
120120
121121func migratePackages (ctx context.Context , dstStorage storage.ObjectStorage ) error {
122- return db .IterateObjects (ctx , func (pb * packages_model.PackageBlob ) error {
122+ return db .Iterate (ctx , nil , func (ctx context. Context , pb * packages_model.PackageBlob ) error {
123123 p := packages_module .KeyToRelativePath (packages_module .BlobHash256Key (pb .HashSHA256 ))
124124 _ , err := storage .Copy (dstStorage , p , storage .Packages , p )
125125 return err
0 commit comments