mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Database column types are now UPPERCASE so that developers can easily recognize them. After upgrading to GORM 2.0, we can use generic types instead. Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
@@ -19,11 +19,11 @@ type Label struct {
|
||||
LabelUID string `gorm:"type:varbinary(42);unique_index;" json:"UID" yaml:"UID"`
|
||||
LabelSlug string `gorm:"type:varbinary(255);unique_index;" json:"Slug" yaml:"-"`
|
||||
CustomSlug string `gorm:"type:varbinary(255);index;" json:"CustomSlug" yaml:"-"`
|
||||
LabelName string `gorm:"type:varchar(255);" json:"Name" yaml:"Name"`
|
||||
LabelPriority int `gorm:"type:varchar(255);" json:"Priority" yaml:"Priority,omitempty"`
|
||||
LabelFavorite bool `gorm:"type:varchar(255);" json:"Favorite" yaml:"Favorite,omitempty"`
|
||||
LabelDescription string `gorm:"type:text;" json:"Description" yaml:"Description,omitempty"`
|
||||
LabelNotes string `gorm:"type:text;" json:"Notes" yaml:"Notes,omitempty"`
|
||||
LabelName string `gorm:"type:VARCHAR(255);" json:"Name" yaml:"Name"`
|
||||
LabelPriority int `gorm:"type:VARCHAR(255);" json:"Priority" yaml:"Priority,omitempty"`
|
||||
LabelFavorite bool `gorm:"type:VARCHAR(255);" json:"Favorite" yaml:"Favorite,omitempty"`
|
||||
LabelDescription string `gorm:"type:TEXT;" json:"Description" yaml:"Description,omitempty"`
|
||||
LabelNotes string `gorm:"type:TEXT;" json:"Notes" yaml:"Notes,omitempty"`
|
||||
LabelCategories []*Label `gorm:"many2many:categories;association_jointable_foreignkey:category_id" json:"-" yaml:"-"`
|
||||
PhotoCount int `gorm:"default:1" json:"PhotoCount" yaml:"-"`
|
||||
CreatedAt time.Time `json:"CreatedAt" yaml:"-"`
|
||||
|
||||
Reference in New Issue
Block a user