"""Change uploaded_at to TIMESTAMP in EventMedia

Revision ID: 216402147826
Revises: b22d339ed2af
Create Date: 2025-09-01 10:22:55.285710

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = '216402147826'
down_revision: Union[str, None] = 'b22d339ed2af'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('event_media', 'uploaded_at',
               existing_type=mysql.DATETIME(),
               type_=sa.TIMESTAMP(),
               nullable=False)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('event_media', 'uploaded_at',
               existing_type=sa.TIMESTAMP(),
               type_=mysql.DATETIME(),
               nullable=True)
    # ### end Alembic commands ###
