feat(audit): truncate stdout/stderr to 64KB + index FlowRun(user_id, started_at desc)
- Truncate accumulated stdout/stderr to last 64KB before persisting FlowStep to prevent unbounded DB growth on verbose commands - Add @@index([user_id, started_at(sort: Desc)]) to FlowRun schema so audit list queries (WHERE user_id = ? ORDER BY started_at DESC) use the index - Add migration 20260513200000_flowrun_user_idx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2ed378fb8f
commit
b74cf3d75f
3 changed files with 9 additions and 1 deletions
|
|
@ -42,6 +42,8 @@ model FlowRun {
|
|||
exit_code Int?
|
||||
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
||||
steps FlowStep[]
|
||||
|
||||
@@index([user_id, started_at(sort: Desc)])
|
||||
}
|
||||
|
||||
model FlowStep {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue