feat: add database schema for transaction attachments

- Add attachment table with fields for file metadata and relationships
- Include indexes for optimal query performance on transactionId, orgId, userId, and uploaded fields
- Support for file storage with path tracking and soft deletion

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-01 11:02:58 +12:00
parent b5ea2095e4
commit c335c834ba
2 changed files with 8 additions and 2 deletions

View File

@@ -3,4 +3,8 @@ CREATE INDEX split_accountId_index ON split (accountId);
CREATE INDEX split_transactionId_index ON split (transactionId);
CREATE INDEX split_date_index ON split (date);
CREATE INDEX split_updated_index ON split (updated);
CREATE INDEX budgetitem_orgId_index ON budgetitem (orgId);
CREATE INDEX budgetitem_orgId_index ON budgetitem (orgId);
CREATE INDEX attachment_transactionId_index ON attachment (transactionId);
CREATE INDEX attachment_orgId_index ON attachment (orgId);
CREATE INDEX attachment_userId_index ON attachment (userId);
CREATE INDEX attachment_uploaded_index ON attachment (uploaded);