forked from mtusi2026/mtusi2026lab5
28 lines
771 B
Python
28 lines
771 B
Python
"""add status to attachments
|
|
|
|
Revision ID: 1c0bb32fbe88
|
|
Revises: 8203fbed8a46
|
|
Create Date: 2026-11-17 15:38:59.622410
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '1c0bb32fbe88'
|
|
down_revision: Union[str, None] = '8203fbed8a46'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('attachments', sa.Column('status', sa.String(), server_default='queued', nullable=False))
|
|
op.add_column('attachments', sa.Column('error_code', sa.String(), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('attachments', 'error_code')
|
|
op.drop_column('attachments', 'status') |