Refactor migrations to use gofff


Although goff is not yet ready to replace the current code for migrations in Gitea, a draft implementation was started to find out as soon as possible the pain points. In theory it should go like this.

The following are removed because they are redundant with goff:

The following are modified to use goff:

  • gitea_uploader.go
    • Adjust abstract methods to gofff naming and types (CreateRepository becomes CreateProject, etc.)
    • Implement CreateRepositories
    • CreatePullRequests refactored to not use the result of CreateRepositories
  • dump.go and restore.go are removed except for two functions:
  • migrate.go is removed except for the MigrateRepository function to use a gofff downloader
  • forgeignreferences to have the same fields as gofff ForeignReferences table

The following are left untouched:

To be continued

1 Like