- Backend: TaskComment model + migration, comment CRUD endpoints, task reorder endpoint, updated selectinload for comments - Frontend: Two-panel master-detail layout with TaskRow (compact) and TaskDetailPanel (full details + comments section) - Sort toolbar: manual (drag-and-drop via @dnd-kit), priority, due date - Kanban board view with drag-and-drop between status columns - Responsive: mobile falls back to overlay panel on task select Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
925 B
Python
37 lines
925 B
Python
"""add task comments
|
|
|
|
Revision ID: 009
|
|
Revises: 008
|
|
Create Date: 2026-02-22
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "009"
|
|
down_revision = "008"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.create_table(
|
|
"task_comments",
|
|
sa.Column("id", sa.Integer(), primary_key=True, autoincrement=True),
|
|
sa.Column(
|
|
"task_id",
|
|
sa.Integer(),
|
|
sa.ForeignKey("project_tasks.id", ondelete="CASCADE"),
|
|
nullable=False,
|
|
),
|
|
sa.Column("content", sa.Text(), nullable=False),
|
|
sa.Column("created_at", sa.DateTime(), server_default=sa.func.now()),
|
|
)
|
|
op.create_index("ix_task_comments_task_id", "task_comments", ["task_id"])
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_task_comments_task_id", table_name="task_comments")
|
|
op.drop_table("task_comments")
|