Backend: - [W1] Add server_default=func.now() on created_at/updated_at - [W2] Add index on reset_at column (migration 016) - [W7] Document weekly reset edge case in code comment Frontend: - [W4] Extract shared isTodoOverdue() utility in lib/utils.ts, used consistently across TodosPage, TodoItem, TodoList - [W5] Delete requires double-click confirmation (button turns red for 2s, second click confirms) with optimistic removal - [W6] Stat cards now reflect filtered counts, not global - [S3] Optimistic delete with rollback on error - [S4] Add "None" to priority segmented filter - [S7] Sort todos within groups by due date ascending Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
736 B
Python
29 lines
736 B
Python
"""Add index on reset_at and server defaults on timestamps
|
|
|
|
Revision ID: 016
|
|
Revises: 015
|
|
Create Date: 2026-02-23
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "016"
|
|
down_revision = "015"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.create_index("ix_todos_reset_at", "todos", ["reset_at"])
|
|
op.alter_column("todos", "created_at", server_default=sa.func.now())
|
|
op.alter_column("todos", "updated_at", server_default=sa.func.now())
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.alter_column("todos", "updated_at", server_default=None)
|
|
op.alter_column("todos", "created_at", server_default=None)
|
|
op.drop_index("ix_todos_reset_at", table_name="todos")
|