"""update course string max length

Revision ID: 8e38378fd2f3
Revises: 01b284ceabf9
Create Date: 2024-10-01 13:11:16.073772

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


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


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


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