20 lines
499 B
Python
20 lines
499 B
Python
import sqlalchemy as sa
|
|
from alembic import op
|
|
from sqlalchemy.dialects.postgresql import JSONB
|
|
|
|
revision = "0007_trace_context"
|
|
down_revision = "0006_attachment_quarantine"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
for table in ("jobs", "outbox"):
|
|
op.add_column(
|
|
table, sa.Column("trace_context", JSONB(), nullable=False, server_default="{}")
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
raise RuntimeError("Downgrade would delete trace correlation data")
|