mirror of
https://github.com/penpot/penpot.git
synced 2026-08-06 21:08:34 +00:00
✨ Add missing indexes on audit_log table
This commit is contained in:
parent
e186a27174
commit
f8f7a0828e
@ -81,7 +81,7 @@
|
|||||||
(def ^:private sql:get-audit-log-chunk
|
(def ^:private sql:get-audit-log-chunk
|
||||||
"SELECT *
|
"SELECT *
|
||||||
FROM audit_log
|
FROM audit_log
|
||||||
WHERE archived_at is null
|
WHERE archived_at IS NULL
|
||||||
ORDER BY created_at ASC
|
ORDER BY created_at ASC
|
||||||
LIMIT 128
|
LIMIT 128
|
||||||
FOR UPDATE
|
FOR UPDATE
|
||||||
|
|||||||
@ -465,6 +465,9 @@
|
|||||||
{:name "0145-fix-plugins-uri-on-profile"
|
{:name "0145-fix-plugins-uri-on-profile"
|
||||||
:fn mg0145/migrate}
|
:fn mg0145/migrate}
|
||||||
|
|
||||||
|
{:name "0145-mod-audit-log-table"
|
||||||
|
:fn (mg/resource "app/migrations/sql/0145-mod-audit-log-table.sql")}
|
||||||
|
|
||||||
{:name "0146-mod-access-token-table"
|
{:name "0146-mod-access-token-table"
|
||||||
:fn (mg/resource "app/migrations/sql/0146-mod-access-token-table.sql")}])
|
:fn (mg/resource "app/migrations/sql/0146-mod-access-token-table.sql")}])
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX audit_log__created_at__idx ON audit_log(created_at) WHERE archived_at IS NULL;
|
||||||
|
CREATE INDEX audit_log__archived_at__idx ON audit_log(archived_at) WHERE archived_at IS NOT NULL;
|
||||||
Loading…
x
Reference in New Issue
Block a user