mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	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 <michael.kriese@gmx.de> Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
		
					parent
					
						
							
								6d703bb6e3
							
						
					
				
			
			
				commit
				
					
						1b11ca6f36
					
				
			
		
					 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