30 lines
733 B
Python
30 lines
733 B
Python
"""add messages.bcc_addr
|
|||
|
|
|
||
|
|
The Sent copy of an outgoing message includes a Bcc header (standard client
|
||
|
|
behavior) so the sender keeps a record of blind recipients; store it structured
|
||
|
|
alongside to/cc for display.
|
||
|
|
|
||
|
|
Revision ID: 0007
|
||
|
|
Revises: 0006
|
||
|
|
Create Date: 2026-07-18
|
||
|
|
"""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from collections.abc import Sequence
|
||
|
|
|
||
|
|
from alembic import op
|
||
|
|
|
||
|
|
revision: str = "0007"
|
||
|
|
down_revision: str | None = "0006"
|
||
|
|
branch_labels: str | Sequence[str] | None = None
|
||
|
|
depends_on: str | Sequence[str] | None = None
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade() -> None:
|
||
|
|
op.execute("ALTER TABLE messages ADD COLUMN bcc_addr jsonb NOT NULL DEFAULT '[]'")
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade() -> None:
|
||
|
|
op.execute("ALTER TABLE messages DROP COLUMN IF EXISTS bcc_addr")
|