32 lines
689 B
Python
32 lines
689 B
Python
"""Add max_images column to jobs table
|
|
|
|
Revision ID: 003
|
|
Revises: 002
|
|
Create Date: 2025-01-25
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision: str = '003'
|
|
down_revision: Union[str, None] = '002'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# Add max_images column to jobs table
|
|
try:
|
|
op.add_column('jobs', sa.Column('max_images', sa.Integer(), nullable=True))
|
|
except Exception:
|
|
pass # Column may already exist
|
|
|
|
|
|
def downgrade() -> None:
|
|
try:
|
|
op.drop_column('jobs', 'max_images')
|
|
except Exception:
|
|
pass
|