aboutsummaryrefslogtreecommitdiffstats
path: root/services/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'services/migrations')
-rw-r--r--services/migrations/common.go4
-rw-r--r--services/migrations/migrate.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/services/migrations/common.go b/services/migrations/common.go
index 305ae89b2d..052975c9e7 100644
--- a/services/migrations/common.go
+++ b/services/migrations/common.go
@@ -8,7 +8,7 @@ import (
"fmt"
"strings"
- admin_model "code.gitea.io/gitea/models/admin"
+ system_model "code.gitea.io/gitea/models/system"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
base "code.gitea.io/gitea/modules/migration"
@@ -17,7 +17,7 @@ import (
// WarnAndNotice will log the provided message and send a repository notice
func WarnAndNotice(fmtStr string, args ...interface{}) {
log.Warn(fmtStr, args...)
- if err := admin_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil {
+ if err := system_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil {
log.Error("create repository notice failed: ", err)
}
}
diff --git a/services/migrations/migrate.go b/services/migrations/migrate.go
index 040f0aebb1..dfb21b884b 100644
--- a/services/migrations/migrate.go
+++ b/services/migrations/migrate.go
@@ -14,8 +14,8 @@ import (
"strings"
"code.gitea.io/gitea/models"
- admin_model "code.gitea.io/gitea/models/admin"
repo_model "code.gitea.io/gitea/models/repo"
+ system_model "code.gitea.io/gitea/models/system"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/hostmatcher"
"code.gitea.io/gitea/modules/log"
@@ -132,7 +132,7 @@ func MigrateRepository(ctx context.Context, doer *user_model.User, ownerName str
if err1 := uploader.Rollback(); err1 != nil {
log.Error("rollback failed: %v", err1)
}
- if err2 := admin_model.CreateRepositoryNotice(fmt.Sprintf("Migrate repository from %s failed: %v", opts.OriginalURL, err)); err2 != nil {
+ if err2 := system_model.CreateRepositoryNotice(fmt.Sprintf("Migrate repository from %s failed: %v", opts.OriginalURL, err)); err2 != nil {
log.Error("create respotiry notice failed: ", err2)
}
return nil, err