diff --git a/backend/alembic/versions/010_make_remind_at_nullable.py b/backend/alembic/versions/010_make_remind_at_nullable.py new file mode 100644 index 0000000..e9de4f2 --- /dev/null +++ b/backend/alembic/versions/010_make_remind_at_nullable.py @@ -0,0 +1,23 @@ +"""make remind_at nullable + +Revision ID: 010 +Revises: 009 +Create Date: 2026-02-22 + +""" +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = "010" +down_revision = "009" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + op.alter_column("reminders", "remind_at", existing_type=sa.DateTime(), nullable=True) + + +def downgrade() -> None: + op.alter_column("reminders", "remind_at", existing_type=sa.DateTime(), nullable=False) diff --git a/backend/app/models/reminder.py b/backend/app/models/reminder.py index 24162ac..b1fbd71 100644 --- a/backend/app/models/reminder.py +++ b/backend/app/models/reminder.py @@ -11,7 +11,7 @@ class Reminder(Base): id: Mapped[int] = mapped_column(primary_key=True, index=True) title: Mapped[str] = mapped_column(String(255), nullable=False) description: Mapped[Optional[str]] = mapped_column(Text, nullable=True) - remind_at: Mapped[datetime] = mapped_column(nullable=False) + remind_at: Mapped[Optional[datetime]] = mapped_column(nullable=True) is_active: Mapped[bool] = mapped_column(Boolean, default=True) is_dismissed: Mapped[bool] = mapped_column(Boolean, default=False) recurrence_rule: Mapped[Optional[str]] = mapped_column(String(255), nullable=True) diff --git a/backend/app/schemas/project_task.py b/backend/app/schemas/project_task.py index 9a407af..4d0cd32 100644 --- a/backend/app/schemas/project_task.py +++ b/backend/app/schemas/project_task.py @@ -4,7 +4,7 @@ from typing import Optional, List, Literal from app.schemas.task_comment import TaskCommentResponse TaskStatus = Literal["pending", "in_progress", "completed"] -TaskPriority = Literal["low", "medium", "high"] +TaskPriority = Literal["none", "low", "medium", "high"] class ProjectTaskCreate(BaseModel): diff --git a/backend/app/schemas/reminder.py b/backend/app/schemas/reminder.py index f34cfdd..b9be26d 100644 --- a/backend/app/schemas/reminder.py +++ b/backend/app/schemas/reminder.py @@ -6,7 +6,7 @@ from typing import Optional class ReminderCreate(BaseModel): title: str description: Optional[str] = None - remind_at: datetime + remind_at: Optional[datetime] = None is_active: bool = True recurrence_rule: Optional[str] = None @@ -24,7 +24,7 @@ class ReminderResponse(BaseModel): id: int title: str description: Optional[str] - remind_at: datetime + remind_at: Optional[datetime] is_active: bool is_dismissed: bool recurrence_rule: Optional[str] diff --git a/backend/app/schemas/todo.py b/backend/app/schemas/todo.py index 9748811..147eb87 100644 --- a/backend/app/schemas/todo.py +++ b/backend/app/schemas/todo.py @@ -2,7 +2,7 @@ from pydantic import BaseModel, ConfigDict from datetime import datetime, date from typing import Optional, Literal -TodoPriority = Literal["low", "medium", "high"] +TodoPriority = Literal["none", "low", "medium", "high"] class TodoCreate(BaseModel): diff --git a/frontend/src/components/calendar/EventForm.tsx b/frontend/src/components/calendar/EventForm.tsx index ea99c8e..c12d9d4 100644 --- a/frontend/src/components/calendar/EventForm.tsx +++ b/frontend/src/components/calendar/EventForm.tsx @@ -214,7 +214,7 @@ export default function EventForm({ event, initialStart, initialEnd, initialAllD