#107: V1.0.0__DataTransfer_Base_version.sql

plugins/org.projectforge.plugins.datatransfer/src/main/resources/flyway/datatransfer/init/common/V1.0.0__DataTransfer_Base_version.sql Path: plugins/...datatransfer/src/main/resources/flyway/datatransfer/init/common/V1.0.0__DataTransfer_Base_version.sql · Lines: 37 · Type: Flyway database migration SQL (v1.0.0) 37 lines · 32 code · 0 comments · 5 blank

Initial schema creation for the DataTransfer plugin's core table t_plugin_datatransfer_area. This is the base migration in init/common/ — dialect-specific overrides go in init/{vendor}/ subdirectories (e.g. PostgreSQL-specific index types, MySQL storage engines).

Table t_plugin_datatransfer_area — 17 data columns

pkINTEGER NOT NULLPrimary key
tenant_idINTEGERMulti-tenant foreign key → t_tenant
created, last_updateTIMESTAMPAudit timestamps
deletedBOOLEAN NOT NULLSoft-delete flag
area_nameVARCHAR(100) NOT NULLDisplay name of the transfer area
admin_idsVARCHAR(4000)Comma-separated admin user IDs
access_group_idsVARCHAR(4000)Comma-separated group IDs with full file access
access_user_idsVARCHAR(4000)Comma-separated user IDs with full file access
descriptionVARCHAR(4000)Visible to external users via link/password
external_download_enabledBOOLEANAllow anonymous external downloads?
external_upload_enabledBOOLEANAllow anonymous external uploads?
external_access_tokenVARCHAR(100)Unique token in external URL — can be renewed
external_passwordVARCHAR(100)Brute-force protected — min 6 chars
expiry_daysINTEGERDays after which files auto-delete
max_upload_size_kbINTEGERPer-file upload limit
external_access_logsVARCHAR(10000)JSON-serialized audit trail of external events (last 30 days)
attachments_names, attachments_idsVARCHAR(10000)Internal field — file metadata (migrated to JCR attachments in later versions)
attachments_sizeINTEGERTotal file size in KB — used for capacity display

Constraints and indexes

Note: This table stores serialized ID lists (admin_ids, access_group_ids, access_user_ids) as comma-separated VARCHARs rather than junction tables — a design choice for simplicity, typical of early ProjectForge plugin schemas. The external_access_logs field stores audit trail as raw JSON/string in a single column rather than a normalized audit table.