Skip to content
Snippets Groups Projects
Commit a026efce authored by Frédéric Guillot's avatar Frédéric Guillot Committed by fguillot
Browse files

Use created_at instead of published_at for archiving entries

parent 1908c84f
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,7 @@ func (s *Storage) ArchiveEntries(status string, days int) (int64, error) {
SET
status='removed'
WHERE
id=ANY(SELECT id FROM entries WHERE status=$1 AND starred is false AND share_code='' AND published_at < now () - '%d days'::interval ORDER BY published_at ASC LIMIT 5000)
id=ANY(SELECT id FROM entries WHERE status=$1 AND starred is false AND share_code='' AND created_at < now () - '%d days'::interval ORDER BY created_at ASC LIMIT 5000)
`
result, err := s.db.Exec(fmt.Sprintf(query, days), status)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment