Files
archived-ackify-ce/backend/migrations/0017_add_reader_fields_to_documents.up.sql
T
Benjamin fb9dab2f0f feat: add document storage and integrated PDF viewer
Storage:
- Add S3 and local storage providers for document uploads
- Support file upload with checksum calculation
- Fix S3 upload for non-TLS connections (MinIO)

Document viewer:
- Add PDF.js-based viewer with scroll tracking
- Implement checksum verification on document load
- Add reader options (read mode, download, require full read)
- Auto-detect read completion for signed documents

API:
- Add document upload endpoint with storage integration
- Add proxy endpoint for stored documents
- Extend document metadata with storage and reader fields
2026-01-08 20:39:34 +01:00

21 lines
1.2 KiB
SQL

-- SPDX-License-Identifier: AGPL-3.0-or-later
-- Add reader configuration fields to documents table
-- These fields control the integrated document reader behavior
-- read_mode: 'external' (link to external URL) or 'integrated' (embedded reader)
ALTER TABLE documents ADD COLUMN read_mode TEXT NOT NULL DEFAULT 'integrated' CHECK (read_mode IN ('external', 'integrated'));
-- allow_download: Whether users can download the document
ALTER TABLE documents ADD COLUMN allow_download BOOLEAN NOT NULL DEFAULT true;
-- require_full_read: Whether user must scroll through entire document before signing
ALTER TABLE documents ADD COLUMN require_full_read BOOLEAN NOT NULL DEFAULT false;
-- verify_checksum: Whether to verify document checksum on each signature
ALTER TABLE documents ADD COLUMN verify_checksum BOOLEAN NOT NULL DEFAULT true;
COMMENT ON COLUMN documents.read_mode IS 'Reading mode: external (link) or integrated (embedded reader)';
COMMENT ON COLUMN documents.allow_download IS 'Whether document download is allowed';
COMMENT ON COLUMN documents.require_full_read IS 'Whether full document read is required before signing';
COMMENT ON COLUMN documents.verify_checksum IS 'Whether to verify document checksum on signature';