summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/supplier_reactions.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sqlstore/supplier_reactions.go')
-rw-r--r--store/sqlstore/supplier_reactions.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sqlstore/supplier_reactions.go b/store/sqlstore/supplier_reactions.go
index 1732b16ee..052472bf9 100644
--- a/store/sqlstore/supplier_reactions.go
+++ b/store/sqlstore/supplier_reactions.go
@@ -147,8 +147,8 @@ func (s *SqlSupplier) ReactionPermanentDeleteBatch(ctx context.Context, endTime
result := store.NewSupplierResult()
var query string
- if *utils.Cfg.SqlSettings.DriverName == "postgres" {
- query = "DELETE from Reactions WHERE Id = any (array (SELECT Id FROM Reactions WHERE CreateAt < :EndTime LIMIT :Limit))"
+ if s.DriverName() == "postgres" {
+ query = "DELETE from Reactions WHERE CreateAt = any (array (SELECT CreateAt FROM Reactions WHERE CreateAt < :EndTime LIMIT :Limit))"
} else {
query = "DELETE from Reactions WHERE CreateAt < :EndTime LIMIT :Limit"
}