feat: implement custom fields, gantt view, calendar view, and file encryption
- Custom Fields (FEAT-001): - CustomField and TaskCustomValue models with formula support - CRUD API for custom field management - Formula engine for calculated fields - Frontend: CustomFieldEditor, CustomFieldInput, ProjectSettings page - Task list API now includes custom_values - KanbanBoard displays custom field values - Gantt View (FEAT-003): - TaskDependency model with FS/SS/FF/SF dependency types - Dependency CRUD API with cycle detection - start_date field added to tasks - GanttChart component with Frappe Gantt integration - Dependency type selector in UI - Calendar View (FEAT-004): - CalendarView component with FullCalendar integration - Date range filtering API for tasks - Drag-and-drop date updates - View mode switching in Tasks page - File Encryption (FEAT-010): - AES-256-GCM encryption service - EncryptionKey model with key rotation support - Admin API for key management - Encrypted upload/download for confidential projects - Migrations: 011 (custom fields), 012 (encryption keys), 013 (task dependencies) - Updated issues.md with completion status 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
48
backend/migrations/versions/012_encryption_keys_table.py
Normal file
48
backend/migrations/versions/012_encryption_keys_table.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Encryption keys table and attachment encryption_key_id
|
||||
|
||||
Revision ID: 012
|
||||
Revises: 011
|
||||
Create Date: 2026-01-05
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers
|
||||
revision = '012'
|
||||
down_revision = '011'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Create encryption_keys table
|
||||
op.create_table(
|
||||
'pjctrl_encryption_keys',
|
||||
sa.Column('id', sa.String(36), primary_key=True),
|
||||
sa.Column('key_data', sa.Text, nullable=False), # Encrypted key using Master Key
|
||||
sa.Column('algorithm', sa.String(20), default='AES-256-GCM', nullable=False),
|
||||
sa.Column('is_active', sa.Boolean, default=True, nullable=False),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.now(), nullable=False),
|
||||
sa.Column('rotated_at', sa.DateTime, nullable=True),
|
||||
)
|
||||
op.create_index('idx_encryption_key_active', 'pjctrl_encryption_keys', ['is_active'])
|
||||
|
||||
# Add encryption_key_id column to attachments table
|
||||
op.add_column(
|
||||
'pjctrl_attachments',
|
||||
sa.Column(
|
||||
'encryption_key_id',
|
||||
sa.String(36),
|
||||
sa.ForeignKey('pjctrl_encryption_keys.id', ondelete='SET NULL'),
|
||||
nullable=True
|
||||
)
|
||||
)
|
||||
op.create_index('idx_attachment_encryption_key', 'pjctrl_attachments', ['encryption_key_id'])
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index('idx_attachment_encryption_key', 'pjctrl_attachments')
|
||||
op.drop_column('pjctrl_attachments', 'encryption_key_id')
|
||||
op.drop_index('idx_encryption_key_active', 'pjctrl_encryption_keys')
|
||||
op.drop_table('pjctrl_encryption_keys')
|
||||
Reference in New Issue
Block a user