From ff7416f858c14b6340ada876f480d40521afe407 Mon Sep 17 00:00:00 2001 From: lishuang Date: Sat, 18 Jul 2020 15:28:31 +0800 Subject: [PATCH] Fix the index syntax. --- code/rest/matter_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/rest/matter_model.go b/code/rest/matter_model.go index 5cf3cfa..aaaecf5 100644 --- a/code/rest/matter_model.go +++ b/code/rest/matter_model.go @@ -45,7 +45,7 @@ type Matter struct { Children []*Matter `json:"-" gorm:"-"` Prop string `json:"prop" gorm:"type:varchar(1024) not null;default:'{}'"` VisitTime time.Time `json:"visitTime" gorm:"type:timestamp not null;default:'2018-01-01 00:00:00'"` - Deleted bool `json:"deleted" gorm:"type:tinyint(1) not null:idx_del;default:0"` + Deleted bool `json:"deleted" gorm:"type:tinyint(1) not null;index:idx_del;default:0"` DeleteTime time.Time `json:"deleteTime" gorm:"type:timestamp not null;index:idx_delt;default:'2018-01-01 00:00:00'"` }