
- Added due_date field to Todo model
- Updated schemas to include due_date field
- Created Alembic migration for the new field
- Added API endpoint to filter todos by due date range
- Updated README to document the new feature
🤖 Generated with BackendIM... (backend.im)
Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
447 B
Python
24 lines
447 B
Python
"""add due_date column to todo table
|
|
|
|
Revision ID: 002
|
|
Revises: 001
|
|
Create Date: 2025-05-13
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '002'
|
|
down_revision = '001'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('todo', sa.Column('due_date', sa.DateTime(timezone=True), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('todo', 'due_date') |