n8n/docs
Arvin Ansari 9bd83fa52d
refactor(core): Narrow the activity event repository to its write path (no-changelog)
Review follow-ups on the activity event table.

- `record` no longer accepts an `EntityManager`. Handing a driver handle to
  callers is the leak `BaseRepository` and `TransactionRunner` exist to
  prevent, and no caller wanted it: an entry describes something that already
  happened, so it must not roll back with the operation that produced it.
- Drop `findById` and `findProjectIdForResource`. Both are reader work, both
  arrived with no caller and no test.
- `projectIds` is required on a feed query. It is the access boundary, and an
  omitted scope read every project on the instance. A comment saying "required"
  is not an access check.
- A zero retention cap deletes everything instead of asking the driver for a
  negative offset.

Two comments described mechanisms that do not hold. Pruning deletes the oldest
rows, so it never frees the highest SQLite rowid; only emptying the table does.
And a project deletion cannot be recorded against the project, because the
resource vocabulary has no entry for one.
2026-09-01 18:35:51 +02:00
..
generated refactor(core): Narrow the activity event repository to its write path (no-changelog) 2026-09-01 18:35:51 +02:00
db.md feat(core): Add auto-generated database schema documentation (no-changelog) (#32069) 2026-06-12 07:44:01 +00:00