mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 17:29:31 +01:00
f6067a8465
* fix typo * Migrate reviews when migrating repository from github * fix lint * Added test and migration when external user login * fix test * fix commented state * Some improvements * fix bug when get pull request and ref original author on code comments * Fix migrated line; Added comment for review * Don't load all pull requests attributes * Fix typo * wrong change copy head * fix tests * fix reactions * Fix test * fix fmt * fix review comment reactions
24 lines
447 B
Go
24 lines
447 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package migrations
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func addReviewMigrateInfo(x *xorm.Engine) error {
|
|
type Review struct {
|
|
OriginalAuthor string
|
|
OriginalAuthorID int64
|
|
}
|
|
|
|
if err := x.Sync2(new(Review)); err != nil {
|
|
return fmt.Errorf("Sync2: %v", err)
|
|
}
|
|
return nil
|
|
}
|