You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/services/migrations
singuliere 8bd89ca294
preserve users if restoring a repository on the same Gitea instance (#18604)
When calling DumpRepository and RestoreRepository on the same Gitea
instance, the users are preserved: all labels, issues etc. belong to
the external user who is, in this particular case, the local user.

Dead code verifying g.gitServiceType.Name() == "" (i.e. plain git) is
removed. The function is never called because the plain git downloader
does not migrate anything that is associated to a user, by definition.

Errors returned by GetUserIDByExternalUserID are no longer ignored.

The userMap is used when the external user is not kown, which is the
most common case. It was only used when the external user exists
which happens less often and, as a result, every occurence of an
unknown external user required a SQL query.

Signed-off-by: Loïc Dachary <loic@dachary.org>

Co-authored-by: Loïc Dachary <loic@dachary.org>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
codebase.go format with gofumpt (#18184) 2 years ago
codebase_test.go Add migrate from Codebase (#16768) 3 years ago
dump.go Validate migration files (#18203) 2 years ago
error.go format with gofumpt (#18184) 2 years ago
git.go format with gofumpt (#18184) 2 years ago
gitbucket.go format with gofumpt (#18184) 2 years ago
gitea_downloader.go format with gofumpt (#18184) 2 years ago
gitea_downloader_test.go Move migrations into services and base into modules/migration (#17663) 3 years ago
gitea_uploader.go preserve users if restoring a repository on the same Gitea instance (#18604) 2 years ago
gitea_uploader_test.go preserve users if restoring a repository on the same Gitea instance (#18604) 2 years ago
github.go format with gofumpt (#18184) 2 years ago
github_test.go refactoring nits (#18188) 3 years ago
gitlab.go GitLab reviews may not have the updated_at field set (#18450) 2 years ago
gitlab_test.go GitLab reviews may not have the updated_at field set (#18450) 2 years ago
gogs.go format with gofumpt (#18184) 2 years ago
gogs_test.go refactoring nits (#18188) 3 years ago
http_client.go Use `hostmatcher` to replace `matchlist`, improve security (#17605) 3 years ago
main_test.go GitLab reviews may not have the updated_at field set (#18450) 2 years ago
migrate.go format with gofumpt (#18184) 2 years ago
migrate_test.go Move user related model into models/user (#17781) 3 years ago
onedev.go format with gofumpt (#18184) 2 years ago
onedev_test.go Move migrations into services and base into modules/migration (#17663) 3 years ago
restore.go Validate migration files (#18203) 2 years ago
update.go Move more model into models/user (#17826) 3 years ago