"""add default model and temprature to lesson

Revision ID: df93b8df9291
Revises: 75ce6807f5e5
Create Date: 2024-10-27 06:59:05.040109

"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "df93b8df9291"
down_revision = "75ce6807f5e5"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("ai_course", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "course_default_temprature",
                sa.DECIMAL(precision=10, scale=2),
                nullable=False,
                comment="Course default temprature",
            )
        )

    with op.batch_alter_table("ai_lesson", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "lesson_default_model",
                sa.String(length=255),
                nullable=False,
                comment="Lesson default model",
            )
        )
        batch_op.add_column(
            sa.Column(
                "lesson_default_temprature",
                sa.DECIMAL(precision=10, scale=2),
                nullable=False,
                comment="Lesson default temprature",
            )
        )

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("ai_lesson", schema=None) as batch_op:
        batch_op.drop_column("lesson_default_temprature")
        batch_op.drop_column("lesson_default_model")

    with op.batch_alter_table("ai_course", schema=None) as batch_op:
        batch_op.drop_column("course_default_temprature")

    # ### end Alembic commands ###
