Files
webmail-client/backend/migrations/versions/0008_draft_imap_uid.py
T

30 lines
732 B
Python
Raw Normal View History

"""add drafts.imap_uid
Drafts are mirrored to the account's IMAP Drafts folder (as \\Draft messages) so
they can be continued on any standard mail client. This stores the UID of the
current server copy so it can be replaced/removed.
Revision ID: 0008
Revises: 0007
Create Date: 2026-07-18
"""
from __future__ import annotations
from collections.abc import Sequence
from alembic import op
revision: str = "0008"
down_revision: str | None = "0007"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.execute("ALTER TABLE drafts ADD COLUMN imap_uid integer")
def downgrade() -> None:
op.execute("ALTER TABLE drafts DROP COLUMN IF EXISTS imap_uid")