"""Added ml_models table

Revision ID: <KEY>
Revises: <KEY>
Create Date: 2021-04-16 02:25:10.719706

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "<KEY>"
down_revision = "<KEY>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "ml_models",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("name", sa.String(), nullable=False),
        sa.Column("description", sa.Text(), nullable=True),
        sa.Column("is_principal", sa.Boolean(), nullable=False),
        sa.Column("used_in_competitions", sa.Boolean(), nullable=False),
        sa.Column("prediction_type", sa.String(), nullable=False),
        sa.PrimaryKeyConstraint("id"),
        sa.UniqueConstraint("name"),
    )
    op.create_index(
        op.f("ix_ml_models_is_principal"), "ml_models", ["is_principal"], unique=False
    )
    op.create_index(
        op.f("ix_ml_models_prediction_type"),
        "ml_models",
        ["prediction_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_ml_models_used_in_competitions"),
        "ml_models",
        ["used_in_competitions"],
        unique=False,
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_ml_models_used_in_competitions"), table_name="ml_models")
    op.drop_index(op.f("ix_ml_models_prediction_type"), table_name="ml_models")
    op.drop_index(op.f("ix_ml_models_is_principal"), table_name="ml_models")
    op.drop_table("ml_models")
    # ### end Alembic commands ###

"""Added ml_models table

Revision ID: <KEY>
Revises: <KEY>
Create Date: 2021-04-16 02:25:10.719706

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "<KEY>"
down_revision = "<KEY>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "ml_models",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("name", sa.String(), nullable=False),
        sa.Column("description", sa.Text(), nullable=True),
        sa.Column("is_principal", sa.Boolean(), nullable=False),
        sa.Column("used_in_competitions", sa.Boolean(), nullable=False),
        sa.Column("prediction_type", sa.String(), nullable=False),
        sa.PrimaryKeyConstraint("id"),
        sa.UniqueConstraint("name"),
    )
    op.create_index(
        op.f("ix_ml_models_is_principal"), "ml_models", ["is_principal"], unique=False
    )
    op.create_index(
        op.f("ix_ml_models_prediction_type"),
        "ml_models",
        ["prediction_type"],
        unique=False,
    )
    op.create_index(
        op.f("ix_ml_models_used_in_competitions"),
        "ml_models",
        ["used_in_competitions"],
        unique=False,
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_ml_models_used_in_competitions"), table_name="ml_models")
    op.drop_index(op.f("ix_ml_models_prediction_type"), table_name="ml_models")
    op.drop_index(op.f("ix_ml_models_is_principal"), table_name="ml_models")
    op.drop_table("ml_models")
    # ### end Alembic commands ###

Added ml_models table  Revision ID: <KEY> Revises: <KEY> Create Date: 2021-04-16 02:25:10.719706 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###