Skip to content

Commit 1b11ca6

Browse files
earl-warrenEarl Warren
authored andcommitted
fix: match PackageBlob.HashBlake2b definition and migration (#7543)
If not a migration will show a warning: `[W] Table public.package_blob column hash_blake2b db type is VARCHAR(255), struct type is CHAR(128)` Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7543 Reviewed-by: Michael Kriese <[email protected]> Reviewed-by: Beowulf <[email protected]> Co-authored-by: Earl Warren <[email protected]> Co-committed-by: Earl Warren <[email protected]>
1 parent 6d703bb commit 1b11ca6

File tree

1 file changed

+2
-2
lines changed
  • models/forgejo_migrations

1 file changed

+2
-2
lines changed

models/forgejo_migrations/v26.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import "xorm.io/xorm"
77

88
func AddHashBlake2bToPackageBlob(x *xorm.Engine) error {
99
type PackageBlob struct {
10-
ID int64 `xorm:"pk autoincr"`
11-
HashBlake2b string
10+
ID int64 `xorm:"pk autoincr"`
11+
HashBlake2b string `xorm:"hash_blake2b char(128) UNIQUE(blake2b) INDEX"`
1212
}
1313
return x.Sync(&PackageBlob{})
1414
}

0 commit comments

Comments
 (0)