mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-27 16:35:57 +00:00
[v11.0/forgejo] fix: match PackageBlob.HashBlake2b definition and migration (#7544)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/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)` Co-authored-by: Earl Warren <contact@earl-warren.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7544 Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
parent
a4e8594643
commit
64d8854222
1 changed files with 2 additions and 2 deletions
|
@ -7,8 +7,8 @@ import "xorm.io/xorm"
|
|||
|
||||
func AddHashBlake2bToPackageBlob(x *xorm.Engine) error {
|
||||
type PackageBlob struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
HashBlake2b string
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
HashBlake2b string `xorm:"hash_blake2b char(128) UNIQUE(blake2b) INDEX"`
|
||||
}
|
||||
return x.Sync(&PackageBlob{})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue