Add encrypted envelope recipient state

This commit is contained in:
2026-07-31 22:48:07 +02:00
parent dc6f81dd33
commit e3daf400f3
10 changed files with 272 additions and 2 deletions
@@ -0,0 +1,33 @@
"""v0.1.3 external recipient token state
Revision ID: a6d9e1f4c8b3
Revises: f5c8d0e3b7a2
Create Date: 2026-07-31 18:00:00.000000
"""
from __future__ import annotations
from alembic import op
import sqlalchemy as sa
revision = "a6d9e1f4c8b3"
down_revision = "f5c8d0e3b7a2"
branch_labels = None
depends_on = None
def upgrade() -> None:
with op.batch_alter_table("postbox_messages") as batch_op:
batch_op.add_column(
sa.Column(
"external_recipient_tokens",
sa.JSON(),
nullable=False,
server_default=sa.text("'[]'"),
)
)
def downgrade() -> None:
with op.batch_alter_table("postbox_messages") as batch_op:
batch_op.drop_column("external_recipient_tokens")