"""init

Revision ID: fb8ce6ce7c6b
Revises: 
Create Date: 2021-11-27 16:52:18.035895

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel


# revision identifiers, used by Alembic.
revision = "fb8ce6ce7c6b"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "appid_error",
        sa.Column("pk", sa.Integer(), nullable=True),
        sa.Column("appid", sa.Integer(), nullable=False),
        sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
        sa.Column("reason", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
        sa.PrimaryKeyConstraint("pk"),
        sa.UniqueConstraint("appid"),
    )
    op.create_table(
        "category",
        sa.Column("pk", sa.Integer(), nullable=True),
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column(
            "description", sqlmodel.sql.sqltypes.AutoString(), nullable=False
        ),
        sa.PrimaryKeyConstraint("pk"),
    )
    op.create_table(
        "genre",
        sa.Column("pk", sa.Integer(), nullable=True),
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column(
            "description", sqlmodel.sql.sqltypes.AutoString(), nullable=False
        ),
        sa.PrimaryKeyConstraint("pk"),
    )
    op.create_table(
        "steam_app",
        sa.Column("pk", sa.Integer(), nullable=True),
        sa.Column("appid", sa.Integer(), nullable=False),
        sa.Column("type", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
        sa.Column("is_free", sa.Boolean(), nullable=True),
        sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column(
            "controller_support",
            sqlmodel.sql.sqltypes.AutoString(),
            nullable=True,
        ),
        sa.Column("metacritic_score", sa.Integer(), nullable=True),
        sa.Column(
            "metacritic_url", sqlmodel.sql.sqltypes.AutoString(), nullable=True
        ),
        sa.Column("recommendations", sa.Integer(), nullable=True),
        sa.Column("achievements_total", sa.Integer(), nullable=True),
        sa.Column("release_date", sa.Date(), nullable=True),
        sa.Column("created", sa.DateTime(), nullable=False),
        sa.Column("updated", sa.DateTime(), nullable=False),
        sa.PrimaryKeyConstraint("pk"),
    )
    op.create_index(
        op.f("ix_steam_app_appid"), "steam_app", ["appid"], unique=True
    )
    op.create_index(
        op.f("ix_steam_app_name"), "steam_app", ["name"], unique=False
    )
    op.create_table(
        "achievement",
        sa.Column("pk", sa.Integer(), nullable=True),
        sa.Column("name", 