"""update course string max length

Revision ID: 01b284ceabf9
Revises: 71a20fad83f9
Create Date: 2024-10-01 12:59:07.159639

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision = '01b284ceabf9'
down_revision = '71a20fad83f9'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('course', 'long_description',
               existing_type=sa.VARCHAR(length=2048),
               type_=sqlmodel.sql.sqltypes.AutoString(length=8192),
               existing_nullable=False)
    op.alter_column('course', 'information',
               existing_type=sa.VARCHAR(length=1024),
               type_=sqlmodel.sql.sqltypes.AutoString(length=8192),
               existing_nullable=False)
    op.alter_column('course', 'contant',
               existing_type=sa.VARCHAR(length=1024),
               type_=sqlmodel.sql.sqltypes.AutoString(length=8192),
               existing_nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('course', 'contant',
               existing_type=sqlmodel.sql.sqltypes.AutoString(length=8192),
               type_=sa.VARCHAR(length=1024),
               existing_nullable=False)
    op.alter_column('course', 'information',
               existing_type=sqlmodel.sql.sqltypes.AutoString(length=8192),
               type_=sa.VARCHAR(length=1024),
               existing_nullable=False)
    op.alter_column('course', 'long_description',
               existing_type=sqlmodel.sql.sqltypes.AutoString(length=8192),
               type_=sa.VARCHAR(length=2048),
               existing_nullable=False)
    # ### end Alembic commands ###
