Skip to content

Commit

Permalink
Use smaller field length for Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-dryabzhinsky committed May 28, 2019
1 parent c3f386c commit 4ae9383
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion models/migrations/v87.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import (

func addAvatarFieldToRepository(x *xorm.Engine) error {
type Repository struct {
Avatar string `xorm:"VARCHAR(2048)"`
// ID(10-20)-md5(32) - must fit into 64 symbols
Avatar string `xorm:"VARCHAR(64)"`
}

return x.Sync2(new(Repository))
Expand Down
4 changes: 2 additions & 2 deletions models/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ type Repository struct {
CloseIssuesViaCommitInAnyBranch bool `xorm:"NOT NULL DEFAULT false"`
Topics []string `xorm:"TEXT JSON"`

// Avatar
Avatar string `xorm:"VARCHAR(2048)"`
// Avatar: ID(10-20)-md5(32) - must fit into 64 symbols
Avatar string `xorm:"VARCHAR(64)"`

CreatedUnix util.TimeStamp `xorm:"INDEX created"`
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
Expand Down

0 comments on commit 4ae9383

Please sign in to comment.