feat(backend): hash uploaded files and store hash on documents and annotations
- Flyway V13: add file_hash column to documents and document_annotations - FileService.uploadFile() now returns UploadResult(s3Key, fileHash) with SHA-256 hash computed from raw bytes - Document and DocumentAnnotation models gain a fileHash field - DocumentService propagates the hash at all three upload sites (storeDocument, createDocument, updateDocument) - AnnotationService.createAnnotation() accepts and persists a fileHash - AnnotationController resolves the document's hash and passes it through Closes #55 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- Add content-based file hash to documents for annotation versioning
|
||||
ALTER TABLE documents
|
||||
ADD COLUMN file_hash VARCHAR(64);
|
||||
|
||||
-- Each annotation remembers which file version it was created against
|
||||
ALTER TABLE document_annotations
|
||||
ADD COLUMN file_hash VARCHAR(64);
|
||||
Reference in New Issue
Block a user