- S1: Add composite index (is_active, is_dismissed, remind_at) for /due query performance with multi-user scaling - W3: Snooze endpoint rejects dismissed/inactive reminders (409) - W4: Custom field_validator on ReminderSnooze for clear error message - S2: aria-label on all snooze/dismiss buttons in banner and toasts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
663 B
Python
31 lines
663 B
Python
"""Add snoozed_until column to reminders
|
|
|
|
Revision ID: 017
|
|
Revises: 016
|
|
Create Date: 2026-02-23
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "017"
|
|
down_revision = "016"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column("reminders", sa.Column("snoozed_until", sa.DateTime(), nullable=True))
|
|
op.create_index(
|
|
"ix_reminders_due_lookup",
|
|
"reminders",
|
|
["is_active", "is_dismissed", "remind_at"],
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index("ix_reminders_due_lookup", table_name="reminders")
|
|
op.drop_column("reminders", "snoozed_until")
|