refactor(database): 移除HostGroup模型中Description字段的索引
移除Description字段上的数据库索引,因为该字段通常不需要快速查询, 这将减少数据库的存储开销并提高写入性能。
This commit is contained in:
@@ -6,6 +6,6 @@ import "gorm.io/gorm"
|
|||||||
type HostGroup struct {
|
type HostGroup struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
Name string `json:"name" gorm:"not null;comment:主机组名称;index"`
|
Name string `json:"name" gorm:"not null;comment:主机组名称;index"`
|
||||||
Description string `json:"description" gorm:"null;comment:主机组描述;index"`
|
Description string `json:"description" gorm:"null;comment:主机组描述"`
|
||||||
ParentID uint `json:"parent_id" gorm:"null;comment:父级ID;index"`
|
ParentID uint `json:"parent_id" gorm:"null;comment:父级ID;index"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user