Skip to content

Add due date and priority fields to Task model #3

Description

@sonnymay

Summary

Extend the Task model with due_date and priority fields. This demonstrates schema evolution, Alembic migrations, and thoughtful API versioning — all practical backend skills.

Acceptance criteria

  • Task model gains optional due_date (ISO 8601 date) and priority (enum: low / medium / high, default medium)
  • Pydantic request/response schemas updated — both fields are optional to keep existing clients compatible
  • GET /tasks/?priority=high filter works alongside existing pagination params
  • GET /tasks/?due_before=2025-12-31 filter returns tasks due on or before the given date
  • Alembic migration script included (or SQLAlchemy create_all comment updated with field notes)
  • Tests cover creating a task with and without the new fields, and the new filter params

Notes

Priority enum and nullable date column are a common pattern in production task/project management APIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions