We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1bc014 commit aea6bcdCopy full SHA for aea6bcd
backend/src/applications/files/services/files-scheduler.service.ts
@@ -124,7 +124,7 @@ export class FilesScheduler {
124
WHERE ${fk} IS NOT NULL
125
AND id NOT IN (SELECT id
126
FROM (SELECT id,
127
- ROW_NUMBER() OVER (PARTITION BY ${fk} ORDER BY ${filesRecents.mtime}) AS rn
+ ROW_NUMBER() OVER (PARTITION BY ${fk} ORDER BY ${filesRecents.mtime} DESC) AS rn
128
FROM ${filesRecents}
129
WHERE ${fk} IS NOT NULL) AS ranked
130
WHERE ranked.rn <= ${keepNumber})
0 commit comments