From 28f064eedf66e853997fc79f5515fc1f398c27be Mon Sep 17 00:00:00 2001 From: JustSong Date: Wed, 19 Apr 2023 13:00:44 +0800 Subject: [PATCH] fix: change gorm type int to bigint to avoid problem in MySQL (close #54) --- model/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/message.go b/model/message.go index e1b4adf..11fd833 100644 --- a/model/message.go +++ b/model/message.go @@ -17,7 +17,7 @@ type Message struct { Channel string `json:"channel"` Token string `json:"token" gorm:"-:all"` HTMLContent string `json:"html_content" gorm:"-:all"` - Timestamp int64 `json:"timestamp" gorm:"type:int64"` + Timestamp int64 `json:"timestamp" gorm:"type:bigint"` Link string `json:"link" gorm:"unique;index"` To string `json:"to" gorm:"column:to"` // if specified, will send to this user(s) Status int `json:"status" gorm:"default:0"` // pending, sent, failed