Skip to content

Commit

Permalink
perf: add database indices (unkeyed#2192)
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark authored and AkshayBandi027 committed Oct 5, 2024
1 parent f3ca181 commit 46eab7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/db/src/schema/audit_logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export const auditLog = mysqlTable(
},
(table) => ({
workspaceId: index("workspace_id_idx").on(table.workspaceId),
bucketId: index("bucket_id_idx").on(table.bucketId),
event: index("event_idx").on(table.event),
actorId: index("actor_id_idx").on(table.actorId),
time: index("time_idx").on(table.time),
}),
);

Expand Down Expand Up @@ -115,6 +119,7 @@ export const auditLogTarget = mysqlTable(
},
(table) => ({
pk: primaryKey({ columns: [table.auditLogId, table.id] }),
auditLog: index("audit_log_id").on(table.auditLogId),
}),
);

Expand Down

0 comments on commit 46eab7a

Please sign in to comment.