29 lines
712 B
Python
29 lines
712 B
Python
"""add accounts.sync_spam
|
|||
|
|
|
||
|
|
Per-account toggle for whether the Spam/Junk folder is synced. Off by default —
|
||
|
|
most users don't want spam mirrored into the app; they can opt in at setup.
|
||
|
|
|
||
|
|
Revision ID: 0015
|
||
|
|
Revises: 0014
|
||
|
|
Create Date: 2026-08-05
|
||
|
|
"""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from collections.abc import Sequence
|
||
|
|
|
||
|
|
from alembic import op
|
||
|
|
|
||
|
|
revision: str = "0015"
|
||
|
|
down_revision: str | None = "0014"
|
||
|
|
branch_labels: str | Sequence[str] | None = None
|
||
|
|
depends_on: str | Sequence[str] | None = None
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade() -> None:
|
||
|
|
op.execute("ALTER TABLE accounts ADD COLUMN sync_spam boolean NOT NULL DEFAULT false")
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade() -> None:
|
||
|
|
op.execute("ALTER TABLE accounts DROP COLUMN IF EXISTS sync_spam")
|