mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 20:51:45 +02:00
🐛 Remove hardcoded limit of 20 on the snapshot list rpc method
This commit is contained in:
parent
0eec09acbf
commit
97b9a7d31c
1 changed files with 13 additions and 7 deletions
|
@ -28,13 +28,19 @@
|
||||||
[cuerdas.core :as str]))
|
[cuerdas.core :as str]))
|
||||||
|
|
||||||
(def sql:get-file-snapshots
|
(def sql:get-file-snapshots
|
||||||
"SELECT id, label, revn, created_at, created_by, profile_id
|
"WITH changes AS (
|
||||||
FROM file_change
|
SELECT id, label, revn, created_at, created_by, profile_id
|
||||||
WHERE file_id = ?
|
FROM file_change
|
||||||
AND data IS NOT NULL
|
WHERE file_id = ?
|
||||||
AND (deleted_at IS NULL OR deleted_at > now())
|
AND data IS NOT NULL
|
||||||
ORDER BY created_at DESC
|
AND (deleted_at IS NULL OR deleted_at > now())
|
||||||
LIMIT 20")
|
), versions AS (
|
||||||
|
(SELECT * FROM changes WHERE created_by = 'system' LIMIT 1000)
|
||||||
|
UNION ALL
|
||||||
|
(SELECT * FROM changes WHERE created_by != 'system' LIMIT 1000)
|
||||||
|
)
|
||||||
|
SELECT * FROM versions
|
||||||
|
ORDER BY created_at DESC;")
|
||||||
|
|
||||||
(defn get-file-snapshots
|
(defn get-file-snapshots
|
||||||
[conn file-id]
|
[conn file-id]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue