docs(db): annotate person-delete ON DELETE behaviour in DB diagrams (#684)
Annotate SET NULL on documents.sender_id and CASCADE on document_receivers.person_id, and add the new transcription_block_mentioned_persons -> persons person_id FK (CASCADE) to both db-relationships.puml and db-orm.puml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -79,9 +79,9 @@ invite_token_group_ids }o--|| invite_tokens : invite_token_id
|
||||
invite_token_group_ids }o--|| user_groups : group_id
|
||||
|
||||
' Document relationships
|
||||
documents }o--o| persons : sender_id
|
||||
documents }o--o| persons : sender_id (ON DELETE SET NULL)
|
||||
document_receivers }o--|| documents : document_id
|
||||
document_receivers }o--|| persons : person_id
|
||||
document_receivers }o--|| persons : person_id (ON DELETE CASCADE)
|
||||
document_tags }o--|| documents : document_id
|
||||
document_tags }o--|| tag : tag_id
|
||||
document_versions }o--|| documents : document_id
|
||||
@@ -113,6 +113,7 @@ transcription_blocks }o--o| app_users : updated_by
|
||||
transcription_block_versions }o--|| transcription_blocks : block_id
|
||||
transcription_block_versions }o--o| app_users : changed_by
|
||||
transcription_block_mentioned_persons }o--|| transcription_blocks : block_id
|
||||
transcription_block_mentioned_persons }o--|| persons : person_id (ON DELETE CASCADE)
|
||||
|
||||
' OCR relationships
|
||||
ocr_job_documents }o--|| ocr_jobs : job_id
|
||||
|
||||
Reference in New Issue
Block a user