aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrate.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrate.go')
-rw-r--r--models/migrate.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/migrate.go b/models/migrate.go
index bbfba1fa1e..2470fd4336 100644
--- a/models/migrate.go
+++ b/models/migrate.go
@@ -83,6 +83,13 @@ func insertIssue(ctx context.Context, issue *Issue) error {
}
}
+ if issue.ForeignReference != nil {
+ issue.ForeignReference.LocalIndex = issue.Index
+ if _, err := sess.Insert(issue.ForeignReference); err != nil {
+ return err
+ }
+ }
+
return nil
}