From fc3d0826096943b979717ed46c9a4cfd86e06106 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 19 Nov 2021 21:39:57 +0800 Subject: Move attachment into models/repo/ (#17650) * Move attachment into models/repo/ * Fix test * Fix bug --- cmd/migrate_storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/migrate_storage.go b/cmd/migrate_storage.go index 1829ad00ba..9f1d9057f9 100644 --- a/cmd/migrate_storage.go +++ b/cmd/migrate_storage.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations" + repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/storage" @@ -79,7 +80,7 @@ var CmdMigrateStorage = cli.Command{ } func migrateAttachments(dstStorage storage.ObjectStorage) error { - return models.IterateAttachment(func(attach *models.Attachment) error { + return repo_model.IterateAttachment(func(attach *repo_model.Attachment) error { _, err := storage.Copy(dstStorage, attach.RelativePath(), storage.Attachments, attach.RelativePath()) return err }) -- cgit v1.2.3