Fix dump and restore respository #16698

Merged
lunny merged 6 commits from lunny/fix_dump_restore into main 2021-08-31 01:18:15 +00:00
Owner

This PR fixed a bug when dumping repositories' PRs which were created from the forked repositories.

  • When migrating, all PRs from forked repositories at original site should be as non-forked PR. And Gitea will create a local branch as head branch of the PR. But we haven't change it correctly before.
  • Fix missing delete release attachments database records when deleting repositories
This PR fixed a bug when dumping repositories' PRs which were created from the forked repositories. - [x] When migrating, all PRs from forked repositories at original site should be as non-forked PR. And Gitea will create a local branch as head branch of the PR. But we haven't change it correctly before. - [x] Fix missing delete release attachments database records when deleting repositories
zeripath approved these changes 2021-08-30 14:27:39 +00:00
zeripath reviewed 2021-08-30 14:28:54 +00:00
@ -1498,2 +1498,4 @@
}
if _, err = sess.In("release_id", builder.Select("id").From("`release`").Where(builder.Eq{"`release`.repo_id": repoID})).
Delete(&Attachment{}); err != nil {
Contributor

I think this is causing a CI faliure

I think this is causing a CI faliure
lunny reviewed 2021-08-30 15:38:52 +00:00
@ -1498,2 +1498,4 @@
}
if _, err = sess.In("release_id", builder.Select("id").From("`release`").Where(builder.Eq{"`release`.repo_id": repoID})).
Delete(&Attachment{}); err != nil {
Author
Owner

resolved.

resolved.
6543 (Migrated from github.com) approved these changes 2021-08-31 01:08:13 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#16698
No description provided.