From 10992f41aef2b0fc776dd19c2ebfa36147c11483 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 17 Jul 2026 16:29:05 +0000 Subject: [PATCH] Note the file_type reuse trade-off in schema.md Evidence Model Record that, because evidence requirements reference the file_type enum rather than a document_type table, adding a new required document kind is a schema change (enum value) rather than a data insert. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app/db/schema/projects/schema.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/db/schema/projects/schema.md b/src/app/db/schema/projects/schema.md index a8e5d89d..9facb0f2 100644 --- a/src/app/db/schema/projects/schema.md +++ b/src/app/db/schema/projects/schema.md @@ -337,6 +337,8 @@ This more accurately reflects the business process and provides a natural locati Evidence requirements define what documentation is expected. +The kind of document expected is expressed with the existing `file_type` enum (see the Evidence Requirement table), so the required and submitted document kinds share one taxonomy. Trade-off: because it's an enum rather than the originally proposed `document_type` reference table, introducing a new *required* document kind is a schema change (add an enum value) rather than a data insert. + Documents actually submitted are rows in the existing `uploaded_files` table, linked back to the requirement, workstream and contractor assignment via new nullable FK columns. This reuses the established upload pipeline instead of introducing a parallel file store. Separating expectation from submission provides flexibility for future enhancements such as: