Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ This file records what changes **in the product** – process and session state

### Changed
- AI service logs use the web/worker format: `time` (ISO 8601, `Z`) instead of `ts`, lower-case pino level labels (`warn`, not `WARNING`), `logger` only on library records.
- The request list reads each page from an index in its sort order instead of sorting all of the
company's requests (#61).

### Fixed
- AI verifier: a unit quoted together with the neighbouring table cell (e.g. `60 | Stk.`) is now
Expand Down
3 changes: 2 additions & 1 deletion docs/technical/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ query sees zero rows and every write fails.
| `rejection_reason` | text | free-text reason of a rejection, max 1000 chars (refused above, not cut – review module); also in the `request.rejected` audit event | confidential |

Unique `(id, company_id)` so child tables can pin the company with composite foreign keys (FK checks
bypass RLS). Purpose: one quote request per row. Retention: open question for the customer (ADR-0001 open points).
bypass RLS). Index `(company_id, created_at desc, id desc)` serves the paged request list (#48, #61) and
every lookup by company. Purpose: one quote request per row. Retention: open question for the customer (ADR-0001 open points).

### `app.extraction_runs`, `app.extraction_segments`, `app.extracted_fields` – processing results (#7)

Expand Down
2 changes: 2 additions & 0 deletions src/db/migrations/0017_request_list_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP INDEX "app"."requests_company_id_idx";--> statement-breakpoint
CREATE INDEX "requests_company_created_idx" ON "app"."requests" USING btree ("company_id","created_at" DESC NULLS FIRST,"id" DESC NULLS FIRST);
Loading
Loading