"""auto

Revision ID: 77087ff2442e
Revises: 64c1927562cc
Create Date: 2025-06-06 08:10:58.028201

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '77087ff2442e'
down_revision = '64c1927562cc'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('media', sa.Column('uploader_id', sa.Integer(), nullable=False))
    op.add_column('media', sa.Column('caption', sa.String(length=255), nullable=True))
    op.create_foreign_key(None, 'media', 'users', ['uploader_id'], ['id'])
    op.add_column('submissions', sa.Column('submission_type', sa.String(length=50), nullable=False))
    op.add_column('submissions', sa.Column('price', sa.Float(), nullable=True))
    op.add_column('submissions', sa.Column('source', sa.String(length=255), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('submissions', 'source')
    op.drop_column('submissions', 'price')
    op.drop_column('submissions', 'submission_type')
    op.drop_constraint(None, 'media', type_='foreignkey')
    op.drop_column('media', 'caption')
    op.drop_column('media', 'uploader_id')
    # ### end Alembic commands ###
