Files
webmail-client/backend/migrations/versions/0002_user_msgid_index.py
T
lukasandClaude Opus 4.8 a5ec0d21cb Initial commit: webmail client (M0/M1)
Three-pane webmail client.
- Backend: FastAPI + async SQLAlchemy + arq worker (Postgres/Redis), IMAP/SMTP
  sync, threading, search, drafts/outbox with undo, attachments, 2FA.
- Frontend: React 18 + Vite + TypeScript + TanStack Query + Tailwind; three-pane
  UI with rich-text composer, light/dark themes, resizable panels.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 23:20:34 +02:00

29 lines
713 B
Python

"""index messages(user_id, message_id_hdr)
Speeds the per-user Message-ID lookups used by JWZ threading (§7.2 candidate
set) and by the duplicate-Message-ID resolution in the indexer (§7.1).
Revision ID: 0002
Revises: 0001
Create Date: 2026-07-17
"""
from __future__ import annotations
from collections.abc import Sequence
from alembic import op
revision: str = "0002"
down_revision: str | None = "0001"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.execute("CREATE INDEX ix_messages_user_msgid ON messages (user_id, message_id_hdr)")
def downgrade() -> None:
op.execute("DROP INDEX IF EXISTS ix_messages_user_msgid")