"""add focal_length_mm and sensor_width_mm to render positions

Revision ID: 4c15abf3cf40
Revises: 6ebfe2737531
Create Date: 2026-03-14 06:31:13.141830

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '4c15abf3cf40'
down_revision: Union[str, None] = '6ebfe2737531'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('global_render_positions', sa.Column('focal_length_mm', sa.Float(), nullable=True))
    op.add_column('global_render_positions', sa.Column('sensor_width_mm', sa.Float(), nullable=True))
    op.add_column('product_render_positions', sa.Column('focal_length_mm', sa.Float(), nullable=True))
    op.add_column('product_render_positions', sa.Column('sensor_width_mm', sa.Float(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('product_render_positions', 'sensor_width_mm')
    op.drop_column('product_render_positions', 'focal_length_mm')
    op.drop_column('global_render_positions', 'sensor_width_mm')
    op.drop_column('global_render_positions', 'focal_length_mm')
    # ### end Alembic commands ###
