"""empty message

Revision ID: c26de9879ad1
Revises: 47bb57ce9f7d
Create Date: 2023-11-13 09:36:08.042719

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "c26de9879ad1"
down_revision = "47bb57ce9f7d"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "media_detections",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("media_id", sa.BigInteger(), nullable=False),
        sa.Column("label", sa.Text(), nullable=False),
        sa.Column("face_female", sa.Boolean(), server_default="false", nullable=False),
        sa.Column(
            "female_genitalia_covered",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "female_genitalia_exposed",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "female_breast_covered",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "female_breast_exposed",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column("face_male", sa.Boolean(), server_default="false", nullable=False),
        sa.Column(
            "male_genitalia_exposed",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "male_breast_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "buttocks_covered", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "buttocks_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column("anus_covered", sa.Boolean(), server_default="false", nullable=False),
        sa.Column("anus_exposed", sa.Boolean(), server_default="false", nullable=False),
        sa.Column("feet_covered", sa.Boolean(), server_default="false", nullable=False),
        sa.Column("feet_exposed", sa.Boolean(), server_default="false", nullable=False),
        sa.Column(
            "belly_covered", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "belly_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "armpits_covered", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "armpits_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column("score", sa.Float(), server_default="0", nullable=False),
        sa.Column("x_coord", sa.Integer(), nullable=True),
        sa.Column("y_coord", sa.Integer(), nullable=True),
        sa.Column("width", sa.Integer(), nullable=True),
        sa.Column("height", sa.Integer(), nullable=True),
        sa.Column(
            "created_at",
            sa.TIMESTAMP(timezone=True),
            server_default=sa.text("TIMEZONE('utc', CURRENT_TIMESTAMP)"),
            nullable=False,
        ),
        sa.ForeignKeyConstraint(
            ["media_id"],
            ["fansly.media.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
        schema="fansly",
    )
    op.create_table(
        "media_detections",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("media_id", sa.BigInteger(), nullable=False),
        sa.Column("label", sa.Text(), nullable=False),
        sa.Column("face_female", sa.Boolean(), server_default="false", nullable=False),
        sa.Column(
            "female_genitalia_covered",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "female_genitalia_exposed",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "female_breast_covered",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "female_breast_exposed",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column("face_male", sa.Boolean(), server_default="false", nullable=False),
        sa.Column(
            "male_genitalia_exposed",
            sa.Boolean(),
            server_default="false",
            nullable=False,
        ),
        sa.Column(
            "male_breast_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "buttocks_covered", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "buttocks_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column("anus_covered", sa.Boolean(), server_default="false", nullable=False),
        sa.Column("anus_exposed", sa.Boolean(), server_default="false", nullable=False),
        sa.Column("feet_covered", sa.Boolean(), server_default="false", nullable=False),
        sa.Column("feet_exposed", sa.Boolean(), server_default="false", nullable=False),
        sa.Column(
            "belly_covered", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "belly_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "armpits_covered", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column(
            "armpits_exposed", sa.Boolean(), server_default="false", nullable=False
        ),
        sa.Column("score", sa.Float(), server_default="0", nullable=False),
        sa.Column("x_coord", sa.Integer(), nullable=True),
        sa.Column("y_coord", sa.Integer(), nullable=True),
        sa.Column("width", sa.Integer(), nullable=True),
        sa.Column("height", sa.Integer(), nullable=True),
        sa.Column(
            "created_at",
            sa.TIMESTAMP(timezone=True),
            server_default=sa.text("TIMEZONE('utc', CURRENT_TIMESTAMP)"),
            nullable=False,
        ),
        sa.ForeignKeyConstraint(
            ["media_id"],
            ["onlyfans.media.id"],
        ),
        sa.PrimaryKeyConstraint("id"),
        schema="onlyfans",
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("media_detections", schema="onlyfans")
    op.drop_table("media_detections", schema="fansly")
    # ### end Alembic commands ###
