fix createdAt error for reply likes on newer mariadb

This commit is contained in:
Azareal 2020-04-10 08:44:52 +10:00
parent 7d30a66d26
commit d74471d591
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ func init() {
re := "replies" re := "replies"
replyStmts = ReplyStmts{ replyStmts = ReplyStmts{
isLiked: acc.Select("likes").Columns("targetItem").Where("sentBy=? and targetItem=? and targetType='replies'").Prepare(), isLiked: acc.Select("likes").Columns("targetItem").Where("sentBy=? and targetItem=? and targetType='replies'").Prepare(),
createLike: acc.Insert("likes").Columns("weight,targetItem,targetType,sentBy").Fields("?,?,?,?").Prepare(), createLike: acc.Insert("likes").Columns("weight,targetItem,targetType,sentBy,createdAt").Fields("?,?,?,?,UTC_TIMESTAMP()").Prepare(),
edit: acc.Update(re).Set("content=?,parsed_content=?").Where("rid=? AND poll=0").Prepare(), edit: acc.Update(re).Set("content=?,parsed_content=?").Where("rid=? AND poll=0").Prepare(),
setPoll: acc.Update(re).Set("poll=?").Where("rid=? AND poll=0").Prepare(), setPoll: acc.Update(re).Set("poll=?").Where("rid=? AND poll=0").Prepare(),
delete: acc.Delete(re).Where("rid=?").Prepare(), delete: acc.Delete(re).Where("rid=?").Prepare(),