|
|
@@ -159,7 +159,8 @@ type Repository struct {
|
|
|
Name string `xorm:"INDEX NOT NULL"`
|
|
|
Description string `xorm:"VARCHAR(512)"`
|
|
|
Website string
|
|
|
- Donate string
|
|
|
+ DonateURL string
|
|
|
+ DonateBadge string
|
|
|
DefaultBranch string
|
|
|
Size int64 `xorm:"NOT NULL DEFAULT 0"`
|
|
|
UseCustomAvatar bool
|
|
|
@@ -1414,10 +1415,12 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e
|
|
|
if len(repo.Website) > 255 {
|
|
|
repo.Website = repo.Website[:255]
|
|
|
}
|
|
|
- if len(repo.Donate) > 255 {
|
|
|
- repo.Donate = repo.Donate[:255]
|
|
|
+ if len(repo.DonateURL) > 255 {
|
|
|
+ repo.DonateURL = repo.DonateURL[:255]
|
|
|
+ }
|
|
|
+ if len(repo.DonateBadge) > 255 {
|
|
|
+ repo.DonateBadge = repo.DonateBadge[:255]
|
|
|
}
|
|
|
-
|
|
|
if _, err = e.ID(repo.ID).AllCols().Update(repo); err != nil {
|
|
|
return fmt.Errorf("update: %v", err)
|
|
|
}
|